Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe ROLAND2014-03-14 15:16:43 +0000
committerPhilippe ROLAND2014-03-14 15:16:43 +0000
commit6f70c04962bc001ae9a61ccf39665168ba3626cf (patch)
tree6e0ee714eb1298e29bc1382dda2a9b6efd1c7537
parentc05175d4aee887c85fa8c32daa7b991123f274a9 (diff)
parent9f626161fd840f0cdbbd96a0bbba8454f140d8a3 (diff)
downloadorg.eclipse.papyrus-6f70c04962bc001ae9a61ccf39665168ba3626cf.tar.gz
org.eclipse.papyrus-6f70c04962bc001ae9a61ccf39665168ba3626cf.tar.xz
org.eclipse.papyrus-6f70c04962bc001ae9a61ccf39665168ba3626cf.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/papyrus/org.eclipse.papyrus
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/src/org/eclipse/papyrus/acceleo/ui/handlers/CmdHandler.java4
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF25
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java18
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/CmdHandler.java4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.MF44
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.gen.MF18
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.gen.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/Diagram_InternalBlock.gifbin139 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/diagram-proteus.gifbin224 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/proteus-24x24.gifbin1225 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/robot24x24.gifbin1019 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/model/Proteus.Architecture.idgen36
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.gen.xml27
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.gen.xml242
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.xml326
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/Activator.java103
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramCreateCommand.java40
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramEditorFactory.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramForMultiEditor.java114
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/part/ArchitectureDiagramEditPart.java37
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/policy/ArchitectureDiagramDragDropEditPolicy.java90
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/factory/ArchitectureDiagramViewFactory.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/part/ArchitectureDiagramEditor.java485
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramGeneralPreferencePage.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramLinkPreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramNodePreferencePage.java117
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramPreferenceInitializer.java35
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/CommentPreferencePage.java31
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java93
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConnectorPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConstraintPreferencePage.java31
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java34
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java52
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPartProvider.java48
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPolicyProvider.java67
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramElementTypes.java88
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramViewProvider.java43
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramEditPartProvider.java77
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramViewProvider.java251
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/UMLValidationDecoratorProvider.java72
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src/org/eclipse/papyrus/robotml/diagram/architecture/provider/CustomArchitectureDiagramEditPolicyProvider.java112
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/.project6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/META-INF/MANIFEST.MF6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/build.properties4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/css/style.css5
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/architecture.gif)bin136 -> 136 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.xml)0
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/icons/obj16/componentdef.gif)bin114 -> 114 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.xml)67
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeD.gif)bin136 -> 136 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.xml)0
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceI.gif)bin135 -> 135 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.xml)27
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/code_generation.gif (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/default.gif)bin534 -> 534 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-24x24.gifbin1225 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-32x32.gifbin1450 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/robotml_16x16.pngbin0 -> 357 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/plugin.xml67
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/Activator.java2
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java42
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java3
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/StereotypeNodeLabelDisplayEditPolicy.java47
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicy/provider/RobotMLDiagramsEditPolicyProvider.java92
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/migration/MigrateDiagramsHandler.java156
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java48
-rwxr-xr-xextraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration33
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.MF39
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.gen.MF18
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.gen.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.properties11
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/model/Proteus.Componentdef.idgen48
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.gen.xml45
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.gen.xml409
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.xml440
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/Activator.java108
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramCreateCommand.java41
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramEditorFactory.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramForMultiEditor.java114
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/part/ComponentdefDiagramEditPart.java37
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/ComponentdefDiagramDragDropEditPolicy.java144
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/factory/ComponentdefDiagramViewFactory.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/part/ComponentdefDiagramEditor.java485
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java97
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentAnnotatedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java92
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramGeneralPreferencePage.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramLinkPreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramNodePreferencePage.java117
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramPreferenceInitializer.java41
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintConstrainedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java33
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java51
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPartProvider.java52
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPolicyProvider.java80
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramElementTypes.java108
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramViewProvider.java42
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramEditPartProvider.java76
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramViewProvider.java402
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/UMLValidationDecoratorProvider.java71
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/CustomComponentdefDiagramDragDropEditPolicy.java90
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/StereotypeNodeLabelDisplayEditPolicy.java40
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/provider/CustomComponentDefDiagramEditPolicyProvider.java101
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.MF38
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.gen.MF18
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.gen.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/Diagram_DomainModel.gifbin113 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeDiagram.gifbin111 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/model/Proteus.datatypedef.idgen84
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.gen.xml87
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.gen.xml700
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.xml702
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/Activator.java103
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefCreateCommand.java40
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefEditorFactory.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefForMultiEditor.java114
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/part/DatatypeDefEditPart.java37
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/policy/DatatypeDefDragDropEditPolicy.java212
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/factory/DatatypeDefViewFactory.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/part/DatatypeDefEditor.java485
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/AssociationPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentAnnotatedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintConstrainedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefGeneralPreferencePage.java21
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefLinkPreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefNodePreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefPreferenceInitializer.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DependencyPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java33
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ElementImportPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationLiteralPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/GeneralizationPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/OperationPreferencePage.java28
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageImportPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageMergePreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java33
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PropertyPreferencePage.java28
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPartProvider.java48
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPolicyProvider.java124
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefElementTypes.java195
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefViewProvider.java42
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramEditPartProvider.java108
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramViewProvider.java564
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.MF36
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.gen.MF18
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.gen.properties10
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.properties11
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceDiagram.gifbin111 -> 0 bytes
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/model/Proteus.interfacedef.idgen57
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.gen.xml57
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.gen.xml506
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.xml525
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/Activator.java103
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefCreateCommand.java41
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefEditorFactory.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefForMultiEditor.java114
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/part/InterfaceDefEditPart.java37
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/policy/InterfaceDefDragDropEditPolicy.java143
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/factory/InterfaceDefViewFactory.java22
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/part/InterfaceDefEditor.java485
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ClassPreferencePage.java28
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentAnnotatedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintConstrainedElementPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintPreferencePage.java30
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java33
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/GeneralizationPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefGeneralPreferencePage.java21
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefLinkPreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefNodePreferencePage.java23
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefPreferenceInitializer.java42
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceRealizationPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/OperationPreferencePage.java28
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageImportPreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageMergePreferencePage.java29
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java53
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PropertyPreferencePage.java28
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramEditPartProvider.java93
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramViewProvider.java363
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPartProvider.java48
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPolicyProvider.java91
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefElementTypes.java123
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefViewProvider.java42
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.help/plugin.xml4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/model/RobotMLProfile.profile.uml2
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/palettes/Palette_Class_RobotML.xml2
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/style.css14
-rw-r--r--extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer/META-INF/MANIFEST.MF1
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature/feature.xml30
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature/feature.xml2
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/.project17
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/build.properties4
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/epl-v10.html304
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.properties133
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.xml77
-rwxr-xr-xfeatures/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/license.html108
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml4
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.sdk.sources.feature/feature.xml4
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml2
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature/feature.xml2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java12
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLPaletteDefinitionProxyFactory.java (renamed from plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLDefinitionPaletteProxyFactory.java)49
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/CreateNodeCommand.xpt400
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt2
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/childContainerCreateCommand.xpt2
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/VisualIDRegistry.xpt7
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/palette/Utils.qvto4
-rwxr-xr-x[-rw-r--r--]plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.classpath (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.classpath)2
-rwxr-xr-x[-rw-r--r--]plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.project)56
-rwxr-xr-x[-rw-r--r--]plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.settings/org.eclipse.jdt.core.prefs (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.settings/org.eclipse.jdt.core.prefs)15
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF13
-rwxr-xr-x[-rw-r--r--]plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/about.html (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/about.html)6
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/build.properties9
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/classf_obj.gifbin0 -> 373 bytes
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/file_obj.gifbin0 -> 354 bytes
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/jar_obj.gifbin0 -> 587 bytes
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/packagefolder_obj.gifbin0 -> 709 bytes
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/plugin_obj.gifbin0 -> 328 bytes
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/sample.gifbin0 -> 983 bytes
-rwxr-xr-x[-rw-r--r--]plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.properties (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.properties)28
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.xml15
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/pluginexplorer.pdoc4
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Activator.java99
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/EmbeddedFile.java125
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PhysicalFile.java147
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Plugin.java227
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginEntry.java76
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentDialog.java182
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentLabelProvider.java33
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentProvider.java124
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentSelectionValidator.java34
-rwxr-xr-xplugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentView.java154
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java27
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java74
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml95
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java793
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java3
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java101
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramEditHelper.java178
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java120
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java165
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java15
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java482
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java34
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java124
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/src/org/eclipse/papyrus/infra/gmfdiag/controlmode/ControlDiagramsCommand.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/plugin.xml29
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java5
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreateDiagramWithNavigationHandler.java173
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx110
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt4
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java88
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java78
-rwxr-xr-xplugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java158
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml70
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java38
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/DynamicTablesMenuContribution.java102
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/PolicyDefinedTableHandler.java78
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/SyncTableCommandHelper.java112
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableCommandHelper.java69
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java107
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java79
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java76
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java41
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java369
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/plugin.xml16
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTable.custom49
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTables.uiCustom68
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.facetSet12
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.querySet13
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.uiCustom17
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java35
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetTableIcon.java32
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java72
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/NotVisibleStructuralFeatureQuery.java37
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/TablesRefCollapseQuery.java35
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTable.xwt8
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java50
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ContextFeatureContentProvider.java65
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java2
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/plugin.xml53
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd7
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF1
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.classpath (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.classpath)15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.project28
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.settings/org.eclipse.jdt.core.prefs (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.settings/org.eclipse.jdt.core.prefs)15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF19
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/about.html (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/about.html)56
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/build.properties12
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.pngbin0 -> 480 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.pngbin0 -> 595 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.pngbin0 -> 629 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.pngbin0 -> 674 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.pngbin0 -> 626 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ChildRule.pngbin0 -> 490 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ElementImport.pngbin0 -> 657 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.pngbin0 -> 577 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.pngbin0 -> 540 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PaletteRule.pngbin0 -> 584 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusConfiguration.pngbin0 -> 747 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusDiagram.pngbin0 -> 453 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusSyncTable.pngbin0 -> 756 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusTable.pngbin0 -> 471 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.pngbin0 -> 638 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.pngbin0 -> 620 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PathElement.pngbin0 -> 388 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties91
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.xml22
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java169
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java248
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java106
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java498
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java182
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java251
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java210
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java152
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java255
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java226
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java115
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java148
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java316
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java166
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java202
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java155
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.classpath (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.classpath)15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.project28
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.settings/org.eclipse.jdt.core.prefs (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.settings/org.eclipse.jdt.core.prefs)15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/META-INF/MANIFEST.MF21
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/about.html (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/about.html)6
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/build.properties11
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/obj16/ConfigurationModelFile.pngbin0 -> 747 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.pngbin0 -> 3821 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.svg250
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.properties65
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.xml34
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationActionBarContributor.java434
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditor.java1795
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditorPlugin.java108
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationModelWizard.java602
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.classpath8
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.project28
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.settings/org.eclipse.jdt.core.prefs (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.settings/org.eclipse.jdt.core.prefs)15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF22
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/about.html (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/about.html)6
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/build.properties14
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EClassPropertyDescriptor.java54
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EPackagePropertyDescriptor.java55
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EReferencePropertyDescriptor.java42
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ProfilePropertyDescriptor.java55
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/StereotypePropertyDescriptor.java83
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/SurrogateItemPropertyDescriptor.java69
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ConfigurationURLSelectionDialog.java149
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ECoreModelContentProvider.java68
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/IModelElementValidator.java29
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ModelElementSelectionDialog.java222
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ChildRule.svg209
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ElementImport.svg206
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ModelRule.svg228
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/OwningRule.svg209
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PaletteRule.svg315
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusConfiguration.svg213
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusDiagram.svg192
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusSyncTable.svg452
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusTable.svg440
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusView.svg272
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusViewpoint.svg199
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PathElement.svg177
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/Stakeholder.svg320
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore110
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel46
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.properties16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.xml11
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java43
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Category.java61
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ChildRule.java124
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java161
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java2230
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java89
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java124
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java107
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PaletteRule.java60
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusConfiguration.java108
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java137
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusSyncTable.java28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusTable.java60
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusView.java183
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusViewpoint.java61
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PathElement.java95
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Rule.java62
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java174
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java319
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java238
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java864
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java228
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java321
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java272
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java173
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java281
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java354
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java50
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java173
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java442
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java168
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java255
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java174
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java438
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java474
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.classpath)13
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.project)56
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs3
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF8
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties6
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml12
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.pngbin0 -> 12893 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.pngbin0 -> 8668 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.pngbin0 -> 28682 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.pngbin0 -> 13523 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.pngbin0 -> 19650 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html34
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki240
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.classpath (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.classpath)14
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.project28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/META-INF/MANIFEST.MF15
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/about.html28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/build.properties12
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_concerns_Concern.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_correspondences_Correspondence.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_decisions_ArchitectureDecision.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_expresses_Architecture.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rationales_ArchitectureRationale.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rules_CorrespondenceRule.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_stakeholders_Stakeholder.pngbin0 -> 582 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_system_System.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_viewpoints_ArchitectureViewpoint.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_views_ArchitectureView.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_concerns_Concern.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_rules_CorrespondenceRule.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_stakeholders_Stakeholder.pngbin0 -> 582 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_viewpoints_ArchitectureViewpoint.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureView_models_ArchitectureModel.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureViewpoint_modelKinds_ModelKind.gifbin0 -> 223 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Architecture.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDecision.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDescription.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureFramework.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureModel.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureRationale.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureView.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureViewpoint.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Concern.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Correspondence.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/CorrespondenceRule.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ModelKind.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Stakeholder.pngbin0 -> 525 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/System.gifbin0 -> 129 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.properties95
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.xml22
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ADElementItemProvider.java180
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDecisionItemProvider.java261
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDescriptionItemProvider.java241
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureFrameworkItemProvider.java199
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureItemProvider.java156
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureModelItemProvider.java146
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureRationaleItemProvider.java146
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewItemProvider.java214
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewpointItemProvider.java214
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ConcernItemProvider.java238
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceItemProvider.java179
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceRuleItemProvider.java156
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010EditPlugin.java100
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010ItemProviderAdapterFactory.java522
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ModelKindItemProvider.java146
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/StakeholderItemProvider.java187
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/SystemItemProvider.java213
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.classpath7
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.project (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.project)56
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/META-INF/MANIFEST.MF16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/about.html28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/build.properties12
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore129
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel84
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.properties16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.xml18
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ADElement.java82
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Activator.java43
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Architecture.java63
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDecision.java148
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDescription.java226
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureFramework.java104
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureModel.java91
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureRationale.java53
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureView.java101
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureViewpoint.java101
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Concern.java129
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Correspondence.java72
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/CorrespondenceRule.java55
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Factory.java170
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Package.java2304
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ModelKind.java82
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Stakeholder.java99
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/System.java111
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ADElementImpl.java248
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDecisionImpl.java368
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDescriptionImpl.java557
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureFrameworkImpl.java274
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureImpl.java220
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureModelImpl.java295
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureRationaleImpl.java176
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewImpl.java308
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewpointImpl.java308
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ConcernImpl.java331
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceImpl.java214
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceRuleImpl.java178
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010FactoryImpl.java263
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010PackageImpl.java1007
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ModelKindImpl.java253
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/StakeholderImpl.java303
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/SystemImpl.java336
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010AdapterFactory.java397
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010Switch.java437
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.classpath (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.classpath)0
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.project (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.project)56
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.core.resources.prefs2
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/META-INF/MANIFEST.MF29
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/about.html28
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/build.properties (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.properties)26
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration195
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Diagram_Package.gif (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/icons/obj16/Diagram_Package.gif)bin111 -> 111 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gifbin0 -> 917 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gifbin0 -> 907 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Table.gifbin0 -> 893 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableDiagram.gifbin0 -> 915 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableTable.gifbin0 -> 914 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableView.gifbin0 -> 901 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/View.gifbin0 -> 898 bytes
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/messages.properties (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.properties)23
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.ecore10
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.genmodel17
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.properties (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.properties)28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.xml51
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/custom.exsd113
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/profilehelper.exsd102
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/viewType.exsd102
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/PapyrusViewStyle.java91
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StyleFactory.java53
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StylePackage.java200
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/PapyrusViewStyleImpl.java229
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StyleFactoryImpl.java106
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StylePackageImpl.java210
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleAdapterFactory.java151
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleSwitch.java139
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/Activator.java79
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicCommandHandler.java68
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicContribution.java77
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IProfileHelper.java47
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IViewTypeHelper.java60
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ModelAddData.java195
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/NotationUtils.java168
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java978
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceConstants.java73
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceInitializer.java41
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ProfileUtils.java86
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/UnavailableViewPrototype.java135
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototype.java440
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java255
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewpointExplorer.java90
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/WeightedConfiguration.java123
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.classpath7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.project28
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.settings/org.eclipse.jdt.core.prefs7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/META-INF/MANIFEST.MF18
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/about.html28
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/build.properties (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties)2
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.properties (renamed from extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.properties)26
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.xml20
-rwxr-xr-x[-rw-r--r--]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/Activator.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/Activator.java)17
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ResourceFieldEditor.java158
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/UpdatableComboBoxFieldEditor.java232
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ViewpointsPreferencePage.java295
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml42
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java25
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java13
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/CreateBlockDefinitionDiagramWithNavigationHandler.java25
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml40
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java34
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/CreateInternalBlockDiagramWithNavigationHandler.java24
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java12
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF34
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml49
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java34
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/CreateParametricDiagramWithNavigationHandler.java25
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java16
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml53
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java30
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java24
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java10
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml3
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml53
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml3
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml53
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/ActivityDiagramCreationCondition.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/CreateActivityDiagramWithNavigationHandler.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AcceptEventActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallBeActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInOpaqueActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsReqCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommandCN.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityFinalNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityParameterNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityPartitionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddStructuralFeatureValueActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddVariableValueActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/BroadcastSignalActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CallOperationActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CentralBufferNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CommentCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConditionalNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPostcondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPrecondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintCreateCommandCN.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPostcondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPrecondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CreateObjectActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DataStoreNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DecisionNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DestroyObjectActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPostcondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPrecondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsInCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsOutCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionRegionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/FlowFinalNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ForkNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InitialNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsValueCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsInsertAtCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsValueCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInBroadcastSignalActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallBeActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInDestroyObjectActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInLoopNodeAsVariableCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInOpaqueActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInReadStructuralFeatureAsObjectCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsReqCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InterruptibleActivityRegionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPostcondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPrecondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/JoinNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/LoopNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/MergeNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OpaqueActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAcceptEventActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallBeActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallOpActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCreateObjectActionAsResultCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsBodyOutputVariableCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsLoopVariableCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsResultCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInOpaqueActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadStructuralFeatureAsResultCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadVariableActionAsResultCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInValSpecActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ParameterCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionOutputPinCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadStructuralFeatureActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadVariableActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendObjectActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendSignalActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SequenceNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ShapeNamedElementCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/StructuredActivityNodeCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPostcondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPrecondCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallBeActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInOpaqueActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsReqCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActAsTargetCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValueSpecificationActionCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/ClassDiagramCreationCondition.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramWithNavigationHandler.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationClassCreateCommand.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationCreateCommand.java32
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CClassifierTemplateParameterCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CConnectableElementTemplateParameterCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/COperationTemplateParameterCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CTemplateParameterCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationClassSupplement.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationSupplement.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomContextLinkCreateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClazzDiagramAssociationHelper.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationBranchItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassLinkItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationNodeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInformationItemItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml55
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationNodeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassifierTemplateParameterCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConnectableElementTemplateParameterCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ContextLinkCreateCommand.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DefaultNamedElementCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DependencyNodeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DurationObservationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationLiteralCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForClassCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForDataTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForPrimitiveTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationTemplateParameterCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForClassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForSignalCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforDataTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforPrimitiveTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionInInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/RedefinableTemplateSignatureCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShapeNamedElementCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SlotCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateParameterCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateSignatureCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TimeObservationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicy.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF208
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java311
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SupplementCommand.java228
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/PaletteUtil.java986
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/FilteringPaletteProvider.java306
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PluginPaletteProvider.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteFactory.java)108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionProfileInspector.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLRequiredProfileFactory.java)44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionVisitor.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/AbstractXMLDefinitionPaletteFactory.java)17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionWalker.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteParser.java)73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramCreationCondition.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CreateCommunicationDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomDurationObservationCreateCommandCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomTimeObservationCreateCommandCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomInteractionCompartmentSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionCompartmentItemSemanticEditPolicy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java104
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/ComponentDiagramCreationCondition.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/CreateComponentDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/command/PortCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/itemsemantic/PropertyPartItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml68
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CompositeDiagramCreationCondition.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PortCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ReceptionCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCreateCommandCLN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java61
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java401
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/CreateDeploymentDiagramWithNavigationHandler.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/DeploymentDiagramCreationCondition.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DefaultNamedElementCreateCommand.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyACN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentDiagramItemSemanticEditPolicy.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java34
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java12
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreateCommand.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/CreateInteractionOverviewDiagramWithNavigationHandler.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreationCondition.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.project28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/net.sf.jautodoc.prefs7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.MF35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.gen.MF18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/about.html28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.gen.properties10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.properties7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/model/UML.Package.idgen52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.gen.xml31
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.xml40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.gen.xml423
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.xml688
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/Activator.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreateCommand.java64
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramEditorFactory.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramForMultiEditor.java116
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/part/PackageDiagramEditPart.java37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/PackageDiagramDragDropEditPolicy.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/factory/PackageDiagramViewFactory.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/part/PackageDiagramEditor.java486
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentLinkPreferencePage.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentPreferencePage.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/DependencyPreferencePage.java75
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java101
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramGeneralPreferencePage.java26
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramLinkPreferencePage.java73
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramNodePreferencePage.java119
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageImportPreferencePage.java74
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackagePreferencePage.java101
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java230
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/IGraphicalTypeRegistry.java110
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java308
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPartProvider.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramViewProvider.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CreatePackageDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreationCondition.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/CustomDragDropEditPolicy.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CustomEditPolicyProvider.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/ProfileDiagramCreationCondition.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml60
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml70
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramWithNavigationHandler.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/StateMachineDiagramCreationCondition.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomConnectionPointReferenceCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateEntryPointCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateExitPointCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/CommentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConnectionPointReferenceCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConstraintCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/DoActivityStateBehaviorStateCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/EntryStateBehaviorCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ExitStateBehaviorCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/FinalStateCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/InternalTransitionCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateChoiceCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateDeepHistoryCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateEntryPointCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateExitPointCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateForkCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateInitialCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJoinCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJunctionCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateShallowHistoryCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateTerminateCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/RegionCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateMachineCreateCommand.java44
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionCreateCommand.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionReorientCommand.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageCanonicalEditPolicy.java294
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionCompartmentItemSemanticEditPolicy.java29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineCompartmentItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/CreateTimingDiagramWithNavigationHandler.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/TimingDiagramCreationCondition.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomInteractionCompartmentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomMessageOccurrenceSpecificationItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml60
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncCreateCommand.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateCreateCommand.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteCreateCommand.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundCreateCommand.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostCreateCommand.java33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyCreateCommand.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncCreateCommand.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncReorientCommand.java38
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java27
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java30
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java127
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java52
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/part/UMLVisualIDRegistry.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/CreateUseCaseDiagramWithNavigationHandler.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UseCaseDiagramCreationCondition.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateAssociationSupplement.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateExtensionPointCommand.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CreateExtensionPointEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomDefaultNamedElementItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomUseCaseDiagramItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml69
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorAsRectangleCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInPackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/AssociationCreateCommand.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInPackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInPackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/DefaultNamedElementCreateCommandTN.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointInRectangleCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandCN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShapeNamedElementCreateCommand.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/SubjectClassifierCreateCommandTN.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseAsRectangleCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseCreateCommandTN.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInComponentCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInPackageCreateCommand.java36
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorAsRectangleItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInComponentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInPackageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/AssociationItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInComponentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInPackageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases2ItemSemanticEditPolicy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases3ItemSemanticEditPolicy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartment2ItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectClassifierItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectComponentUsecasesItemSemanticEditPolicy.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseAsRectangleItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramItemSemanticEditPolicy.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInComponentItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInPackageItemSemanticEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseItemSemanticEditPolicyTN.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInComponentItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInPackageItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInRectangleItemSemanticEditPolicy.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicyTN.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java98
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java18
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java74
-rw-r--r--plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF57
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/plugin.xml3
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic/plugin.xml65
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/plugin.xml6
-rwxr-xr-xplugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/UMLProfileHelper.java67
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF5
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml5
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/dnd/CommonDropAdapterAssistant.java106
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/OpenHandler.java23
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/listener/DoubleClickListener.java19
-rw-r--r--releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-trunk-nightly/build.rmap6
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF1
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java1
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java15
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java6
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java5
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java5
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/org.eclipse.papyrus.uml.diagram.composite.test.launch4
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF27
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/org.eclipse.papyrus.uml.diagram.pkg.test.launch41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/AllTests.java33
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AbstractPapyrusTestCase.java28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AllCanonicalTests.java36
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java81
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java46
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java46
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java66
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java82
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/LoadTests.java38
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF4
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java49
1637 files changed, 63524 insertions, 32912 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/src/org/eclipse/papyrus/acceleo/ui/handlers/CmdHandler.java b/extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/src/org/eclipse/papyrus/acceleo/ui/handlers/CmdHandler.java
index 39c89da798b..8c5e656e4bf 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/src/org/eclipse/papyrus/acceleo/ui/handlers/CmdHandler.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.acceleo.ui/src/org/eclipse/papyrus/acceleo/ui/handlers/CmdHandler.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.acceleo.ui.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.ui.PlatformUI;
@@ -35,7 +35,7 @@ public abstract class CmdHandler extends AbstractHandler {
.getSelectionService().getSelection();
if(selection != null) {
- Object selectedObject = BusinessModelResolver.getInstance().getBusinessModel(selection.getFirstElement());
+ Object selectedObject = EMFHelper.getEObject(selection.getFirstElement());
if (selectedObject instanceof EObject) {
selectedEObject = (EObject) selectedObject;
}
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF
index 91182541b1d..fc88d84f01d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/META-INF/MANIFEST.MF
@@ -1,29 +1,30 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.texteditor.modelexplorer,
org.eclipse.papyrus.texteditor.modelexplorer.queries
Bundle-ActivationPolicy: lazy
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.emf;bundle-version="2.6.0",
- org.eclipse.emf.edit;bundle-version="2.9.0",
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf;bundle-version="2.6.0",
+ org.eclipse.emf.edit;bundle-version="2.9.0",
org.eclipse.papyrus.views.modelexplorer;bundle-version="1.0.0",
- org.eclipse.emf.facet.infra.query.core;bundle-version="0.3.0",
+ org.eclipse.emf.facet.infra.query.core;bundle-version="0.3.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.texteditor.model;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.core.expressions;bundle-version="3.4.500",
- org.eclipse.emf.facet.infra.browser.custom.core;bundle-version="0.3.0",
- org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.3.0",
+ org.eclipse.core.expressions;bundle-version="3.4.500",
+ org.eclipse.emf.facet.infra.browser.custom.core;bundle-version="0.3.0",
+ org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.3.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0"
Bundle-Vendor: %pluginProvider
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.texteditor.modelexplorer.Activat
or
-Import-Package: org.eclipse.papyrus.infra.core.editorsfactory
+Import-Package: org.eclipse.papyrus.infra.core.editorsfactory,
+ org.eclipse.papyrus.infra.viewpoints.policy
Bundle-SymbolicName: org.eclipse.papyrus.texteditor.modelexplorer;sing
leton:=true
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java
index 8aaf591760b..7cfe9d236a9 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer/src/org/eclipse/papyrus/texteditor/modelexplorer/queries/IsTextEditorContainer.java
@@ -21,8 +21,8 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.infra.viewpoints.policy.NotationUtils;
import org.eclipse.papyrus.texteditor.model.texteditormodel.TextEditorModel;
-import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
import org.eclipse.papyrus.views.modelexplorer.queries.AbstractEditorContainerQuery;
/** Returns true if the element contains a Table */
@@ -33,18 +33,14 @@ public class IsTextEditorContainer extends AbstractEditorContainerQuery implemen
* {@inheritDoc}
*/
public Boolean evaluate(final EObject context, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- Iterator<EObject> roots = NavigatorUtils.getNotationRoots(context);
- if(roots == null) {
+ Iterator<EObject> roots = NotationUtils.getNotationRoots(context);
+ if (roots == null)
return false;
- }
-
- while(roots.hasNext()) {
- EObject root = roots.next();
- if(root instanceof TextEditorModel) {
- if(EcoreUtil.equals(((TextEditorModel)root).getEditedObject(), context)) {
+ while (roots.hasNext()) {
+ EObject inner = roots.next();
+ if (inner instanceof TextEditorModel)
+ if (EcoreUtil.equals(((TextEditorModel)inner).getEditedObject(), context))
return true;
- }
- }
}
return false;
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/CmdHandler.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/CmdHandler.java
index ccb634c2366..7fb7f8df94c 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/CmdHandler.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/handlers/CmdHandler.java
@@ -16,7 +16,6 @@ package org.eclipse.papyrus.qompass.designer.ui.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.ui.PlatformUI;
@@ -36,8 +35,7 @@ public abstract class CmdHandler extends AbstractHandler {
.getSelectionService().getSelection();
if(selection != null) {
-
- selectedEObject = EMFHelper.getEObject(selection);
+ selectedEObject = EMFHelper.getEObject(selection.getFirstElement());
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.MF
deleted file mode 100644
index a30bc3026f7..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
- org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
- org.eclipse.uml2.uml,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.emf.common.ui;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.robotml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.architecture.Act
- ivator
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.architecture;
- singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.gen.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.gen.MF
deleted file mode 100644
index 0c181ac2575..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/META-INF/MANIFEST.gen.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.architecture;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.architecture.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.diagram.common,
- org.eclipse.papyrus.core.adaptor.gmf,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.diagram.composite,
- org.eclipse.papyrus.preferences
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.gen.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.gen.properties
deleted file mode 100644
index ca6d14e16f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.gen.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/Diagram_InternalBlock.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/Diagram_InternalBlock.gif
deleted file mode 100644
index b75f79f5ef9..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/Diagram_InternalBlock.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/diagram-proteus.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/diagram-proteus.gif
deleted file mode 100644
index 294127bdf0c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/diagram-proteus.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/proteus-24x24.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/proteus-24x24.gif
deleted file mode 100644
index 0d12622309f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/proteus-24x24.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/robot24x24.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/robot24x24.gif
deleted file mode 100644
index 895cc590ed0..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/robot24x24.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/model/Proteus.Architecture.idgen b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/model/Proteus.Architecture.idgen
deleted file mode 100644
index f72440a7584..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/model/Proteus.Architecture.idgen
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<diagramcontent:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagramcontent="http://www.eclipse.org/papyrus/0.7.0/diagramcontent" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" name="Architecture" label="Proteus Architecture Diagram" icon="icons/obj16/architecture.gif" hint="architecture" javaPackagePrefix="org.eclipse.papyrus.robotml.diagram.architecture" javaClassPrefix="ArchitectureDiagram" language="proteus" createCommandLabel="Create a new Proteus Architecture Diagram">
- <diagramEditPart name="ArchitectureDiagramEditPart">
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.composite.edit.policies.CompositeStructureDiagramItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" key="&quot;RemoveOrphanView&quot;"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.robotml.diagram.architecture.edit.policy.ArchitectureDiagramDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
- </diagramEditPart>
- <inheritedDiagrams name="CompositeDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" paletteToolPrefix="composite.tool">
- <genInheritedEditor href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#CompositeStructure"/>
- <genNodes name="Component">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.10"/>
- </genNodes>
- <genNodes name="" customPreferencePage="">
- <genNode xsi:type="gmfgen:GenChildSideAffixedNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.0"/>
- </genNodes>
- <genNodes>
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.2"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.48"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.53"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.27"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.32"/>
- </genNodes>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.13"/>
- </genLinks>
- </inheritedDiagrams>
-</diagramcontent:Diagram>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.gen.xml
deleted file mode 100644
index c83eb6b91a1..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.gen.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.robotml.diagram.architecture.PROTEUS_Architecture__Tools" name="Tools">
- <aspectTool description="Create a new Component" id="architecture.tool.component"
- name="Component" refToolId="composite.tool.class">
- </aspectTool>
- <aspectTool description="Create a new Port" id="architecture.tool.port"
- name="Port" refToolId="composite.tool.port">
- </aspectTool>
- <aspectTool description="Create a new Property" id="architecture.tool.property"
- name="Property" refToolId="composite.tool.property">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="architecture.tool.comment"
- name="Comment" refToolId="composite.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="architecture.tool.constraint"
- name="Constraint" refToolId="composite.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Connector" id="architecture.tool.connector"
- name="Connector" refToolId="composite.tool.connector">
- </aspectTool>
- </drawer>
- </content>
-</paletteDefinition>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.gen.xml
deleted file mode 100644
index 0c146e5d7ac..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.gen.xml
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramCreateCommand"
- icon="icons/obj16/diagram-proteus.gif"
- id="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- language="uml"
- label="Proteus Architecture Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramEditorFactory"
- icon="icons/obj16/diagram-proteus.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- name="Create a new Proteus Architecture Diagram"
- description="Create a new Proteus Architecture Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/diagram-proteus.gif" label="Create a new Proteus Architecture Diagram"
- style="push" tooltip="Create a new Proteus Architecture Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/diagram-proteus.gif" label="Create a new Proteus Architecture Diagram"
- style="push" tooltip="Create a new Proteus Architecture Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/diagram-proteus.gif"
- label="Create a new Proteus Architecture Diagram"
- style="push"
- tooltip="Create a new Proteus Architecture Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.diagram.common.paletteDefinition"
- name="UML_Architecture">
-
- <paletteDefinition ID="UML_Architecture"
- class="org.eclipse.papyrus.diagram.common.service.PluginPaletteProvider"
- name="UML_Architecture" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/architecture.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.architecture"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="architecture"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.InheritedCompositeDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2073" = CLASS
- "3069" = PORT_CN
- "3070" = PROPERTY_CN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2073, 3069, 3070"/>
-
- <!--
- "4013" = CONNECTOR
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4013"/>
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.architecture.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="architecture"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.InheritedCompositeDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2073" = CLASS
- "5156" = CLASS_LABEL_COMPOSITE_NAME_HINT
- "7073" = CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3069" = PORT_CN
- "5125" = PORT_CN_LABEL_NAME_HINT
- "6029" = PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT
- "3070" = PROPERTY_CN
- "5126" = PROPERTY_CN_LABEL_PART_NAME_HINT
- "7077" = PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT
- -->
- <object
- id="CLASS"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2073, 5156, 7073"/>
- </object>
- <object
- id="PORT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3069, 5125, 6029"/>
- </object>
- <object
- id="PROPERTY_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3070, 5126, 7077"/>
- </object>
-
- <!--
- "4013" = CONNECTOR
- "6025" = CONNECTOR_LABEL_APPLIED_STEREOTYPE_HINT
- -->
- <object
- id="CONNECTOR"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013, 6025"/>
- </object>
-
- <context views="CLASS, PORT_CN, PROPERTY_CN"/>
- <context views="CONNECTOR"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- name="Architecture Diagram"
- category="org.eclipse.papyrus.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ArchitectureDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ComponentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ComponentPreferencePage"
- name="Component">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PortPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PortPreferencePage"
- name="Port">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConnectorPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConnectorPreferencePage"
- name="Connector">
- </page>
-
-
-</extension>
-
-</plugin> \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.xml
deleted file mode 100644
index a65c8ba6f7b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.xml
+++ /dev/null
@@ -1,326 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramCreateCommand"
- icon="icons/obj16/architecture.gif"
- id="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- label="RobotML Architecture Diagram"
- language="robotML"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramEditorFactory"
- icon="icons/obj16/architecture.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- name="Create a new RobotML Architecture Diagram"
- description="Create a new RobotML Architecture Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.architecture.ArchitectureDiagramCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/architecture.gif" label="Create a new RobotML Architecture Diagram"
- style="push" tooltip="Create a new RobotML Architecture Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.robotml.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/architecture.gif" label="Create a new RobotML Architecture Diagram"
- style="push" tooltip="Create a new RobotML Architecture Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.architecture.CreateCommand"
- icon="icons/obj16/architecture.gif"
- label="Create a new RobotML Architecture Diagram"
- style="push"
- tooltip="Create a new RobotML Architecture Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="RobotML_Architecture">
-
- <paletteDefinition ID="RobotML_Architecture"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="RobotML_Architecture" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/architecture.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.architecture"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="architecture"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.InheritedCompositeDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2073" = CLASS
- "3069" = PORT_CN
- "3070" = PROPERTY_CN
- "2109" = COMMENT
- "2114" = CONSTRAINT
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2073, 3069, 3070, 2109, 2114, 2007, 3097, 3085, 3120"/>
-
- <!--
- "4013" = CONNECTOR
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4013,4003, 4002"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Class" -->
- <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Class"/>
- </object>
-
- <!-- "uml.Port" -->
- <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Port"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Connector" -->
- <object id="uml.Connector" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Connector"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Class, uml.Port, uml.Property, uml.Comment, uml.Constraint"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.Connector"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.architecture.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="architecture"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.architecture.provider.InheritedCompositeDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2073" = CLASS
- "5156" = CLASS_LABEL_COMPOSITE_NAME_HINT
- "7073" = CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3069" = PORT_CN
- "5125" = PORT_CN_LABEL_NAME_HINT
- "6029" = PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT
- "3070" = PROPERTY_CN
- "5126" = PROPERTY_CN_LABEL_PART_NAME_HINT
- "7077" = PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT
- "2109" = COMMENT
- "5192" = COMMENT_LABEL_BODY_HINT
- "2114" = CONSTRAINT
- "5197" = CONSTRAINT_LABEL_NAME_HINT
- "6039" = CONSTRAINT_LABEL_SPECIFICATION_HINT
- -->
- <object
- id="CLASS"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2073, 5156, 7073"/>
- </object>
- <object
- id="PORT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3069, 5125, 6029"/>
- </object>
- <object
- id="PROPERTY_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3070, 5126, 7077"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2109, 5192"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2114, 5197, 6039"/>
- </object>
-
-
- <!--
- "4013" = CONNECTOR
- "6025" = CONNECTOR_LABEL_APPLIED_STEREOTYPE_HINT
- -->
- <object
- id="CONNECTOR"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013, 6025"/>
- </object>
-
- <context views="CLASS, PORT_CN, PROPERTY_CN, COMMENT, CONSTRAINT"/>
- <context views="CONNECTOR"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.architecture.provider.CustomArchitectureDiagramEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- name="Architecture Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ArchitectureDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ComponentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ComponentPreferencePage"
- name="Component">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PortPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PortPreferencePage"
- name="Port">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.architecture.preferences"
- class="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConnectorPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConnectorPreferencePage"
- name="Connector">
- </page>
-</extension>
- <extension
- point="org.eclipse.ui.contexts">
- <context
- id="org.eclipse.papyrus.robotml.diagram.architecture.ui.diagramContext"
- name="diagramContext"
- parentId="org.eclipse.papyrus.uml.diagram.composite.ui.diagramContext">
- </context>
- </extension>
-
-</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/Activator.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/Activator.java
deleted file mode 100644
index 42f4875457d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/Activator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.robotml.diagram.architecture.preferences.ArchitectureDiagramPreferenceInitializer;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.robotml.diagram.architecture";
-
- /** The plug-in shared instance */
- private static Activator plugin;
-
- /** The logging helper */
- public static LogHelper log;
-
- /** The plug-in Preference store */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
-
- /** Default constructor */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // register the login helper
- log = new LogHelper(plugin);
-
- // register the preference store
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
-
- // Preferences initialization
- ArchitectureDiagramPreferenceInitializer diagramPreferenceInitializer = new ArchitectureDiagramPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getInstance() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- *
- * @return Shared Preference Store.
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
- return store;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramCreateCommand.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramCreateCommand.java
deleted file mode 100644
index 3ec3f54813c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramCreateCommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class ArchitectureDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- @Override
- protected String getDefaultDiagramName() {
- return "ArchitectureDiagram";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return ArchitectureDiagramEditPart.DIAGRAM_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramEditorFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramEditorFactory.java
deleted file mode 100644
index 07e1657b135..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramEditorFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class ArchitectureDiagramEditorFactory extends GmfEditorFactory {
-
- public ArchitectureDiagramEditorFactory() {
- super(ArchitectureDiagramForMultiEditor.class, ArchitectureDiagramEditPart.DIAGRAM_ID);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramForMultiEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramForMultiEditor.java
deleted file mode 100644
index bb38a90ae54..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/ArchitectureDiagramForMultiEditor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.robotml.diagram.architecture.part.ArchitectureDiagramEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
- *
- */
-public class ArchitectureDiagramForMultiEditor extends ArchitectureDiagramEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/diagram-proteus.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(ArchitectureDiagramForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- *
- */
- public ArchitectureDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.robotml.diagram.architecture.EditingDomain";
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/part/ArchitectureDiagramEditPart.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/part/ArchitectureDiagramEditPart.java
deleted file mode 100644
index d2d8167a102..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/part/ArchitectureDiagramEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.edit.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CompositeStructureDiagramItemSemanticEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.policy.ArchitectureDiagramDragDropEditPolicy;
-
-public class ArchitectureDiagramEditPart extends DiagramEditPart {
-
- public final static String DIAGRAM_ID = "architecture"; //$NON-NLS-1$
-
- public ArchitectureDiagramEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CompositeStructureDiagramItemSemanticEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ArchitectureDiagramDragDropEditPolicy());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/policy/ArchitectureDiagramDragDropEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/policy/ArchitectureDiagramDragDropEditPolicy.java
deleted file mode 100644
index 7c9043a732e..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/edit/policy/ArchitectureDiagramDragDropEditPolicy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramElementTypes;
-
-/** Customization of the DND edit policy for the Architecture Diagram */
-public class ArchitectureDiagramDragDropEditPolicy extends CustomDiagramDragDropEditPolicy {
-
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- String semanticHint = "-1";
-
- String containerGraphicalHint = containerView.getType();
- if(containerGraphicalHint == null) {
- // Cannot guess domain element graphical hint.
- return -1; // -1 = undefined.
- }
-
- // Fill the semantic hint during the drop
- // Elements inherited from CompositeDiagram
- // Dropping Class
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.CLASS.getSemanticHint();
- }
-
- } else
- // Dropping Port
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ArchitectureDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.PORT_CN.getSemanticHint();
- }
-
- } else
- // Dropping Property
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ArchitectureDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
-
- } else
- // Dropping Comment
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.COMMENT.getSemanticHint();
- }
-
- } else
- // Dropping Constraint
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- semanticHint = ArchitectureDiagramElementTypes.CONSTRAINT.getSemanticHint();
- }
-
- }
-
- return new Integer(semanticHint);
- }
-
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- String semanticHint = "-1";
-
- if(domainElement instanceof org.eclipse.uml2.uml.Connector) {
- semanticHint = ArchitectureDiagramElementTypes.CONNECTOR.getSemanticHint();
- }
-
- return new Integer(semanticHint);
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/factory/ArchitectureDiagramViewFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/factory/ArchitectureDiagramViewFactory.java
deleted file mode 100644
index 9933c87fa1b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/factory/ArchitectureDiagramViewFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.factory;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-
-public class ArchitectureDiagramViewFactory extends DiagramViewFactory {
-
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/part/ArchitectureDiagramEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/part/ArchitectureDiagramEditor.java
deleted file mode 100644
index 4833c530fa1..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/part/ArchitectureDiagramEditor.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.part;
-
-import java.util.EventObject;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class ArchitectureDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.robotml.diagram.architecture.part.ArchitectureDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public ArchitectureDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
- }
-
- /**
- * @generated
- */
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- public String getContributorId() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @generated
- */
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
-
- // Replace diagram contextual menu removing default
- // delete from model action.
- DiagramContextMenuProvider provider = (DiagramContextMenuProvider)getDiagramGraphicalViewer().getContextMenu();
- Set<String> menuExclusions = provider.getExclusionSet();
- menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
- provider.setExclusionSet(menuExclusions);
- }
-
- /**
- * @generated
- */
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- savedOperation = getOperationHistory().getUndoOperation(getUndoContext());
- }
-
- /**
- * @generated
- */
- public boolean isDirty() {
- IUndoableOperation op = getOperationHistory().getUndoOperation(getUndoContext());
- return savedOperation != op;
- }
-
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramGeneralPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramGeneralPreferencePage.java
deleted file mode 100644
index 98207e2121c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramGeneralPreferencePage.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-
-public class ArchitectureDiagramGeneralPreferencePage extends DiagramPreferencePage {
-
- public ArchitectureDiagramGeneralPreferencePage() {
- setPreferenceStore(Activator.getInstance().getPreferenceStore());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramLinkPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramLinkPreferencePage.java
deleted file mode 100644
index d9652e59490..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramLinkPreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-
-public class ArchitectureDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramNodePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramNodePreferencePage.java
deleted file mode 100644
index 5da18d3f1f4..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramNodePreferencePage.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.TreeMap;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-import org.eclipse.swt.widgets.Composite;
-
-public class ArchitectureDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /** The list owning the names of compartments */
- protected List<String> compartmentNamesList;
-
- /** The list owning the names of compartment that have a title */
- protected List<String> compartmentTitlesList;
-
- /** The list of label names for this node */
- protected List<String> labelsList;
-
- /** Constructor */
- public ArchitectureDiagramNodePreferencePage() {
- this.labelsList = new ArrayList<String>();
- this.compartmentNamesList = new ArrayList<String>();
- this.compartmentTitlesList = new ArrayList<String>();
-
- initializeLabelsList();
- initializeCompartmentNamesList();
- initializeCompartmentTitlesList();
-
- Collections.unmodifiableList(labelsList);
- Collections.unmodifiableList(compartmentNamesList);
- Collections.unmodifiableList(compartmentTitlesList);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // Add compartments visibility group
- if(!compartmentNamesList.isEmpty()) {
- OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
- addAbstractGroup(compartmentGroup);
- }
-
- // Add label visibility group
- if(!labelsList.isEmpty()) {
- OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
- addAbstractGroup(compartmentGroup);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-
- /** Initialize the list containing names of labels. */
- protected void initializeLabelsList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartments. */
- protected void initializeCompartmentNamesList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartment that have titles. */
- protected void initializeCompartmentTitlesList() {
- // Implemented by subclasses.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, String> getLabelRole() {
- return new TreeMap<String, String>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- return new TreeMap<String, Boolean>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentsList() {
- compartmentsList = Collections.emptyList();
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramPreferenceInitializer.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramPreferenceInitializer.java
deleted file mode 100644
index 23191ee7245..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ArchitectureDiagramPreferenceInitializer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-
-public class ArchitectureDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- protected IPreferenceStore getPreferenceStore() {
- return Activator.getInstance().getPreferenceStore();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.ComponentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.PortPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.PropertyPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.architecture.preferences.ConnectorPreferencePage.initDefaults(store);
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/CommentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/CommentPreferencePage.java
deleted file mode 100644
index 42d40b1ef59..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class CommentPreferencePage extends ArchitectureDiagramNodePreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Comment";
-
-
- public CommentPreferencePage() {
- super();
- setPreferenceKey(ArchitectureDiagramEditPart.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java
deleted file mode 100644
index fd5f20c6e87..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-
-public class ComponentPreferencePage extends ArchitectureDiagramNodePreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Class";
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
-
- /** The compartment titles default visibility for preferences */
- public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
-
- compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
-
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
- Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
- }
-
- /** Constructor */
- public ComponentPreferencePage() {
- super();
- setPreferenceKey(prefKey); //$NON-NLS-1$
- }
-
- /** Default preferences initializer */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentNamesList() {
- for(String name : compartmentDefaultVisibilityMap.keySet()) {
- this.compartmentNamesList.add(name);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentTitlesList() {
- for(String name : compartmentTitleDefaultVisibilityMap.keySet()) {
- this.compartmentTitlesList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConnectorPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConnectorPreferencePage.java
deleted file mode 100644
index 8e9e072e611..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConnectorPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class ConnectorPreferencePage extends ArchitectureDiagramLinkPreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Connector";
-
- public ConnectorPreferencePage() {
- super();
- setPreferenceKey(ArchitectureDiagramEditPart.DIAGRAM_ID + "_Connector"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConstraintPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index f4839972fa9..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class ConstraintPreferencePage extends ArchitectureDiagramNodePreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Constraint";
-
-
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(ArchitectureDiagramEditPart.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java
deleted file mode 100644
index 05ea323b1a4..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class PortPreferencePage extends ArchitectureDiagramNodePreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Port";
-
-
- public PortPreferencePage() {
- super();
- setPreferenceKey(ArchitectureDiagramEditPart.DIAGRAM_ID + "_Port"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java
deleted file mode 100644
index 90050e87235..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class PropertyPreferencePage extends ArchitectureDiagramNodePreferencePage {
-
- public static String prefKey = ArchitectureDiagramEditPart.DIAGRAM_ID + "_Property";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "PropertyPartCompartment" };
-
- public PropertyPreferencePage() {
- super();
- setPreferenceKey(ArchitectureDiagramEditPart.DIAGRAM_ID + "_Property"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPartProvider.java
deleted file mode 100644
index 91a5070fd87..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPartProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-public class ArchitectureDiagramEditPartProvider extends AbstractEditPartProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is Architecture Diagram
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(view.getType())) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramEditPartClass(View view) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(view.getType())) {
- return ArchitectureDiagramEditPart.class;
- }
-
- Activator.log.error(new Exception("Could not create EditPart."));
- return null;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPolicyProvider.java
deleted file mode 100644
index d56ab7b8eda..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramEditPolicyProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.policy.ArchitectureDiagramDragDropEditPolicy;
-
-public class ArchitectureDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- public boolean provides(IOperation operation) {
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartCompartmentEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart) {
- return true;
- }
-
- return false;
- }
-
- public void createEditPolicies(EditPart editPart) {
- editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ArchitectureDiagramDragDropEditPolicy());
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramElementTypes.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramElementTypes.java
deleted file mode 100644
index 3d5965fb624..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramElementTypes.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-public class ArchitectureDiagramElementTypes extends AbstractElementTypeEnumerator {
-
- /** ********************************************************* */
- /** Proteus Architecture Diagram specific elements **************** */
- /** ********************************************************* */
-
- /** Proteus Architecture Diagram :: Diagram */
- public static final IHintedType ARCHITECTURE_DIAGRAM = (IHintedType)getElementType("architecture"); //$NON-NLS-1$
-
-
-
-
- /** ********************************************************* */
- /** Proteus Architecture Diagram - CompositeDiagram related elements */
- /** ********************************************************* */
-
-
- /** CompositeDiagram :: CLASS */
- public static final IHintedType CLASS = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Class_2073"); //$NON-NLS-1$
-
- public static final String CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT = "7073";
-
- public static final String CLASS_LABEL_COMPOSITE_NAME_HINT = "5156";
-
- /** CompositeDiagram :: CLASS_CN */
- public static final IHintedType CLASS_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Class_3085"); //$NON-NLS-1$
-
- public static final String CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT = "7060";
-
- public static final String CLASS_CN_LABEL_COMPOSITE_NAME_HINT = "5155";
-
- /** CompositeDiagram :: PORT_CN */
- public static final IHintedType PORT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Port_3069"); //$NON-NLS-1$
-
- public static final String PORT_CN_LABEL_NAME_HINT = "5125";
-
- public static final String PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT = "6029";
-
- /** CompositeDiagram :: PROPERTY_CN */
- public static final IHintedType PROPERTY_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Property_3070"); //$NON-NLS-1$
-
- public static final String PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT = "7077";
-
- public static final String PROPERTY_CN_LABEL_PART_NAME_HINT = "5126";
-
- /** CompositeDiagram :: COMMENT */
- public static final IHintedType COMMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Comment_2109"); //$NON-NLS-1$
-
- public static final String COMMENT_LABEL_BODY_HINT = "5192";
-
- /** CompositeDiagram :: CONSTRAINT */
- public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_NAME_HINT = "5197";
-
- public static final String CONSTRAINT_LABEL_SPECIFICATION_HINT = "6039";
-
-
- /** CompositeDiagram :: CONNECTOR */
- public static final IHintedType CONNECTOR = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Connector_4013"); //$NON-NLS-1$
-
- public static final String CONNECTOR_LABEL_APPLIED_STEREOTYPE_HINT = "6025";
-
-
- /** CompositeDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
- public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"); //$NON-NLS-1$
-
- /** CompositeDiagram :: COMMENT_ANNOTATED_ELEMENT */
- public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"); //$NON-NLS-1$
-
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramViewProvider.java
deleted file mode 100644
index f7975186639..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/ArchitectureDiagramViewProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import static org.eclipse.papyrus.infra.core.Activator.log;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.architecture.factory.ArchitectureDiagramViewFactory;
-
-public class ArchitectureDiagramViewProvider extends AbstractViewProvider {
-
- @Override
- protected boolean provides(CreateDiagramViewOperation operation) {
-
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(operation.getSemanticHint())) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramKind)) {
- return ArchitectureDiagramViewFactory.class;
- }
-
- log.error(new Exception("Could not create View."));
- return null;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramEditPartProvider.java
deleted file mode 100644
index 5f238f7232e..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramEditPartProvider.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLEditPartProvider;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-
-
-public class InheritedCompositeDiagramEditPartProvider extends UMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is a Architecture Diagram
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(view.getDiagram().getType())) {
- return false;
- }
-
- // Test supported inherited types
- EObject eobject = view.getElement();
-
- /** Nodes (and ChildLabelNodes) *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Class) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Port) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Property) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Comment) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Constraint) {
- return true;
- }
-
- /** Edges *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Connector) {
- return true;
- }
-
-
- // Additional test needed here to decide whether to support Feature type links.
- // As feature type link are not related to a MetaClass from the domain model
- // they are not already handled by previous tests.
- String hint = view.getType();
-
- /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
- if(ArchitectureDiagramElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
- if(ArchitectureDiagramElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramViewProvider.java
deleted file mode 100644
index e5e4767fd16..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/InheritedCompositeDiagramViewProvider.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.architecture.Activator;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLViewProvider;
-
-
-
-public class InheritedCompositeDiagramViewProvider extends UMLViewProvider {
-
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- // No need to override here, assuming provides is correctly implemented.
- Edge createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
-
- if(createdEdge == null) {
- Activator.log.error(new Exception("Could not create Edge."));
- }
-
- return createdEdge;
- }
-
- @Override
- protected boolean provides(CreateViewForKindOperation op) {
-
- // This provider is registered for Internal Block Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- return true;
- }
-
- @Override
- protected boolean provides(CreateEdgeViewOperation op) {
-
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
-
- // This provider is registered for Architecture Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(elementType == ArchitectureDiagramElementTypes.CONNECTOR) {
- return true;
- }
-
- if(elementType == ArchitectureDiagramElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
- return true;
- }
- if(elementType == ArchitectureDiagramElementTypes.COMMENT_ANNOTATED_ELEMENT) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected boolean provides(CreateNodeViewOperation op) {
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
- // Get the type of the container
- String containerGraphicalType = op.getContainerView().getType();
-
- // This provider is registered for Architecture Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the ElementType and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
- if(elementType == ArchitectureDiagramElementTypes.CLASS) {
-
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- //System.err.println("class");
- return true;
- }
- }
-
- if(elementType == ArchitectureDiagramElementTypes.PORT_CN) {
- //System.err.println("provides port view == true");
- return true;
- }
- if(elementType == ArchitectureDiagramElementTypes.PROPERTY_CN) {
- if(ArchitectureDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ArchitectureDiagramElementTypes.COMMENT) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ArchitectureDiagramElementTypes.CONSTRAINT) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
-
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
-
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ArchitectureDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return false;
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return false;
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN.equals(containerGraphicalType)) {
- return true;
- }
- if(ArchitectureDiagramElementTypes.CLASS.equals(containerGraphicalType)) {
- return true;
- }
-
- if(ArchitectureDiagramElementTypes.CLASS_CN.equals(containerGraphicalType)) {
- return true;
- }
- if(ArchitectureDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- return true;
-
-
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ArchitectureDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ArchitectureDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
-
- }
- }
-
- return false;
- }
-
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
- if(semanticHint != null) {
- return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- }
-
- // SemanticHint may be null when the element is created indirectly by
- // DND from model explorer
- // ex: Drag and drop a Connector may require to show ConnectorEnd first.
- EObject eobject = (EObject)semanticAdapter.getAdapter(EObject.class);
-
- if((eobject instanceof org.eclipse.uml2.uml.Class) && (containerView instanceof Diagram)) { // Class TopNode
- return super.createNode(semanticAdapter, containerView, ArchitectureDiagramElementTypes.CLASS.getSemanticHint(), index, persisted, preferencesHint);
- }
- if((eobject instanceof org.eclipse.uml2.uml.Port) && !(containerView instanceof Diagram)) { // Port ChildNode
- //System.err.println("creates port view");
- return super.createNode(semanticAdapter, containerView, ArchitectureDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if((eobject instanceof org.eclipse.uml2.uml.Property) && !(containerView instanceof Diagram)) { // Property ChildNode
- return super.createNode(semanticAdapter, containerView, ArchitectureDiagramElementTypes.PROPERTY_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if((eobject instanceof org.eclipse.uml2.uml.Comment) && (containerView instanceof Diagram)) { // Comment TopNode
- return super.createNode(semanticAdapter, containerView, ArchitectureDiagramElementTypes.COMMENT.getSemanticHint(), index, persisted, preferencesHint);
- }
- if((eobject instanceof org.eclipse.uml2.uml.Constraint) && (containerView instanceof Diagram)) { // Constraint TopNode
- return super.createNode(semanticAdapter, containerView, ArchitectureDiagramElementTypes.CONSTRAINT.getSemanticHint(), index, persisted, preferencesHint);
- }
-
-
- Activator.log.error(new Exception("Could not create Node."));
- return null;
- }
-
- @Override
- protected void stampShortcut(View containerView, Node target) {
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", ArchitectureDiagramEditPart.DIAGRAM_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/UMLValidationDecoratorProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/UMLValidationDecoratorProvider.java
deleted file mode 100644
index 52b07527b0d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/provider/UMLValidationDecoratorProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.architecture.part.ArchitectureDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
-import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
-
- /**
- * @generated
- */
- @Override
- public void createDecorators(IDecoratorTarget decoratorTarget) {
- EditPart editPart = (EditPart)decoratorTarget.getAdapter(EditPart.class);
- if(editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
- Object model = editPart.getModel();
- if((model instanceof View)) {
- View view = (View)model;
- if(!(view instanceof Edge) && !view.isSetElement()) {
- return;
- }
- }
- EditDomain ed = editPart.getViewer().getEditDomain();
- if(!(ed instanceof DiagramEditDomain)) {
- return;
- }
- if(((DiagramEditDomain)ed).getEditorPart() instanceof ArchitectureDiagramEditor) {
- decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- public boolean provides(IOperation operation) {
- if(!(operation instanceof CreateDecoratorsOperation)) {
- return false;
- }
- IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
- View view = (View)decoratorTarget.getAdapter(View.class);
- //System.err.println(ArchitectureDiagramEditPart.DIAGRAM_ID + " " + UMLVisualIDRegistry.getModelID(view));
- return view != null && ArchitectureDiagramEditPart.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src/org/eclipse/papyrus/robotml/diagram/architecture/provider/CustomArchitectureDiagramEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src/org/eclipse/papyrus/robotml/diagram/architecture/provider/CustomArchitectureDiagramEditPolicyProvider.java
deleted file mode 100644
index 85c06c0d723..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src/org/eclipse/papyrus/robotml/diagram/architecture/provider/CustomArchitectureDiagramEditPolicyProvider.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.architecture.provider;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies.HyperLinkPopupBarEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies.NavigationEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.CustomPropertyLabelEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.PortNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.StereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.EncapsulatedClassifierResizableShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortNameEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartNameEditPartCN;
-
-
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class CustomArchitectureDiagramEditPolicyProvider.
- */
-public class CustomArchitectureDiagramEditPolicyProvider extends ArchitectureDiagramEditPolicyProvider {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.robotml.diagram.architecture.provider.ArchitectureDiagramEditPolicyProvider#createEditPolicies(org.eclipse.gef.EditPart)
- */
- @Override
- public void createEditPolicies(EditPart editPart) {
- super.createEditPolicies(editPart);
-
- editPart.installEditPolicy(NavigationEditPolicy.NAVIGATION_POLICY, new NavigationEditPolicy());
- if(!(editPart instanceof ConnectionEditPart)) {
- editPart.installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy());
- }
-
- //if (editPart instanceof NamedElementEditPart)
- editPart.installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new StereotypeNodeLabelDisplayEditPolicy());
- editPart.installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy());
-
- if(editPart instanceof PortNameEditPart || editPart instanceof PropertyPartNameEditPartCN)
- editPart.installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new CustomPropertyLabelEditPolicy());
- else if(editPart instanceof PortEditPart) {
- NotificationListener editPolicy = new PortNodeLabelDisplayEditPolicy();
- editPart.installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, (EditPolicy)editPolicy);
- Object model = editPart.getModel();
- LayoutConstraint notifier = ((Shape)model).getLayoutConstraint();
- if(model instanceof Shape) {
- //to force the refresh the port icon when the diagram is opening
- Notification notification = new ENotificationImpl((InternalEObject)notifier, Notification.SET, NotationPackage.eINSTANCE.getLocation_X(), 0, 0);
- editPolicy.notifyChanged(notification);
- }
- }
-
-
- }
-
- @Override
- public boolean provides(IOperation operation) {
- // TODO Auto-generated method stub
-
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!ArchitectureDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortNameEditPart) {
- return true;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartNameEditPartCN) {
- return true;
- }
- return super.provides(operation);
-
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/.project b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/.project
index df5fc359a97..f3e097808d4 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/.project
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/.project
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -24,5 +29,6 @@
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/META-INF/MANIFEST.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/META-INF/MANIFEST.MF
index a91ef72557a..829a99aed16 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/META-INF/MANIFEST.MF
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/META-INF/MANIFEST.MF
@@ -8,6 +8,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.uml.properties;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
org.eclipse.gmf.runtime.gef.ui;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0",
@@ -16,7 +17,10 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.communication;bundle-version="1.0.0",
org.eclipse.emf.facet.infra.browser.uicore,
- org.eclipse.ui.ide;bundle-version="3.9.0"
+ org.eclipse.ui.ide;bundle-version="3.9.0",
+ org.eclipse.gmf.runtime.notation.edit,
+ org.eclipse.papyrus.infra.gmfdiag.css,
+ org.eclipse.papyrus.uml.diagram.clazz
Export-Package: org.eclipse.papyrus.robotml.diagram.common.commands,
org.eclipse.papyrus.robotml.diagram.common.editpolicies
Bundle-Vendor: %Bundle-Vendor
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/build.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/build.properties
index 01b33ef724c..a27337f278b 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/build.properties
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/build.properties
@@ -6,5 +6,7 @@ bin.includes = META-INF/,\
plugin.properties,\
icons/,\
build.properties,\
- about.html
+ about.html,\
+ viewpoints/,\
+ diagrams/
src.includes = about.html
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/css/style.css b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/css/style.css
new file mode 100644
index 00000000000..abcf14dcf50
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/css/style.css
@@ -0,0 +1,5 @@
+Property {maskLabel:name; elementIcon:false;}
+Property[type] {maskLabel:name type; }
+Port>Label {maskLabel:name; elementIcon:flase;}
+Port>Label:stereotype{visible: false;}
+Class {elementIcon:false;} \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/architecture.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif
index 417288a907f..417288a907f 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/icons/obj16/architecture.gif
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml
index 0a7fdfb5d02..0a7fdfb5d02 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/palettes/architecture.palette.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/icons/obj16/componentdef.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif
index b4f43edbd7f..b4f43edbd7f 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/icons/obj16/componentdef.gif
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml
index d85152667e3..fd2ed580e3b 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml
@@ -5,10 +5,7 @@
iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
id="org.eclipse.papyrus.robotml.diagram.componentdef.ROBOTML_Componentdef__Tools"
name="Systems- Properties">
- <aspectTool description="Create a new Package" id="componentdef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
-
+
<aspectTool description="Create a new Hardware System" id="componentdef.tool.system"
name="Robot" refToolId="composite.tool.class"
iconpath="platform:/plugin/org.eclipse.papyrus.robotml/icons/16x16/03_robot_system.png">
@@ -116,6 +113,53 @@
</drawer>
<drawer
iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.robotml.diagram.componentdef.ROBOTML_Componentdef__Actuators"
+ name="Actuators">
+ <aspectTool description="Create a new ActuatorSystem"
+ id="componentdef.tool.actuator" name="Actuator"
+ refToolId="composite.tool.class"
+ iconpath="platform:/plugin/org.eclipse.papyrus.robotml/icons/16x16/13_action.png">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="RobotML::ActuatorSystem"></stereotype>
+ </stereotypesToApply>
+ </postAction>
+ <postAction
+ id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"
+ displayKind="IconStereotype" displayPlace="Compartment"></postAction>
+ </aspectTool>
+
+ <aspectTool description="Create a new WheelSystem"
+ id="componentdef.tool.WheelSystem" name="WheelSystem"
+ refToolId="composite.tool.class"
+ iconpath="platform:/plugin/org.eclipse.papyrus.robotml/icons/16x16/15_wheel_system.png">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="RobotML::SteeredWheelSystem"></stereotype>
+ </stereotypesToApply>
+ </postAction>
+ <postAction
+ id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"
+ displayKind="IconStereotype" displayPlace="Compartment"></postAction>
+ </aspectTool>
+ <aspectTool description="Create a new EngineSystem"
+ id="componentdef.tool.EngineSystem" name="EngineSystem"
+ refToolId="composite.tool.class"
+ iconpath="platform:/plugin/org.eclipse.papyrus.robotml/icons/16x16/14_engine_system.png">
+ <postAction id="org.eclipse.papyrus.applystereotypeactionprovider">
+ <stereotypesToApply>
+ <stereotype stereotypeName="RobotML::EngineSystem">
+
+ </stereotype>
+ </stereotypesToApply>
+ </postAction>
+ <postAction
+ id="org.eclipse.papyrus.postaction.changeStereotypeDisplayProvider"
+ displayKind="IconStereotype" displayPlace="Compartment"></postAction>
+ </aspectTool>
+ </drawer>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
id="org.eclipse.papyrus.robotml.diagram.componentdef.ROBOTML_Componentdef__Humanoid"
name="Humanoid Components">
<aspectTool description="Create a new LegSystem"
@@ -296,9 +340,18 @@
id="componentdef.tool.link" name="Comment/Constraint link"
refToolId="composite.tool.link">
</aspectTool>
- <!-- <aspectTool description="Create a new Connector" id="componentdef.tool.connector" -->
- <!-- name="Connector" refToolId="composite.tool.connector"> -->
- <!-- </aspectTool> -->
+
+ </drawer>
+ <drawer
+ iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
+ id="org.eclipse.papyrus.robotml.diagram.componentdef.ROBOTML_Componentdef__Links"
+ name="Edges">
+
+ <aspectTool description="Create a Generalization link" id="componentdef.tool.generalization"
+ name="Generalization" refToolId="composite.tool.generalization">
+ </aspectTool>
+
+
</drawer>
</content>
</paletteDefinition>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeD.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif
index 233cdc7b22b..233cdc7b22b 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeD.gif
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml
index 8bbfec1d9de..8bbfec1d9de 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceI.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif
index 232980f668e..232980f668e 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceI.gif
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml
index 36b6bea6c24..15997977459 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml
@@ -16,6 +16,12 @@
<aspectTool description="Create a new Operation" id="interfacedef.tool.operation"
name="Operation" refToolId="clazz.tool.operation">
</aspectTool>
+ <aspectTool description="Create a new Signal" id="interfacedef.tool.signal"
+ name="Signal" refToolId="clazz.tool.signal">
+ </aspectTool>
+ <aspectTool description="Create a new Reception" id="interfacedef.tool.reception"
+ name="Signal" refToolId="clazz.tool.reception">
+ </aspectTool>
<aspectTool description="Create a new Comment" id="interfacedef.tool.comment"
name="Comment" refToolId="clazz.tool.comment">
</aspectTool>
@@ -26,29 +32,18 @@
<drawer
iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
id="org.eclipse.papyrus.robotml.diagram.interfacedef.ROBOTML_InterfaceDef__Edges" name="Edges">
- <aspectTool description="Create a new InterfaceRealization" id="interfacedef.tool.interfacerealization"
- name="InterfaceRealization" refToolId="clazz.tool.interfacerealization">
- </aspectTool>
- <aspectTool description="Create a new PackageImport" id="interfacedef.tool.packageimport"
- name="PackageImport" refToolId="clazz.tool.packageimport">
+
+ <aspectTool description="Create a new Usage" id="interfacedef.tool.packageimport"
+ name="Usage" refToolId="clazz.tool.usage">
</aspectTool>
- <aspectTool description="Create a new PackageMerge" id="interfacedef.tool.packagemerge"
- name="PackageMerge" refToolId="clazz.tool.packagemerge">
+ <aspectTool description="Create a new Realization" id="interfacedef.tool.packagemerge"
+ name="Realization" refToolId="clazz.tool.realization">
</aspectTool>
<aspectTool description="Create a new Link (Comment/Constraint)" id="interfacedef.tool.link"
name="Comment/Constraint link" refToolId="clazz.tool.link">
</aspectTool>
-<!-- <aspectTool description="Create a new CommentAnnotatedElement" id="interfacedef.tool.commentannotatedelement"-->
-<!-- name="CommentAnnotatedElement" refToolId="clazz.tool.link">-->
-<!-- </aspectTool>-->
-<!-- <aspectTool description="Create a new ConstraintConstrainedElement" id="interfacedef.tool.constraintconstrainedelement"-->
-<!-- name="ConstraintConstrainedElement" refToolId="clazz.tool.link">-->
-<!-- </aspectTool>-->
-<!-- <aspectTool description="Create a new Generalization" id="interfacedef.tool.generalization"-->
-<!-- name="Generalization" refToolId="clazz.tool.generalization">-->
-<!-- </aspectTool>-->
</drawer>
</content>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/default.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/code_generation.gif
index 6a04c491b29..6a04c491b29 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/default.gif
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/code_generation.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-24x24.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-24x24.gif
deleted file mode 100644
index 0d12622309f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-24x24.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-32x32.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-32x32.gif
deleted file mode 100644
index d6533c1526a..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/proteus-32x32.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/robotml_16x16.png b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/robotml_16x16.png
new file mode 100644
index 00000000000..02d225bf284
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/icons/robotml_16x16.png
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/plugin.xml
index 925631d81a9..f1673ab4e63 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/plugin.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/plugin.xml
@@ -47,7 +47,7 @@
<extension id="papyrus.robotML.menuspapyrus.generate" name="Generate to Middleware/Simulator" point="org.eclipse.ui.menus">
<menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.views.modelexplorer.popupmenu.createchild">
<menu
- icon="icons/default.gif"
+ icon="icons/code_generation.gif"
id="org.eclipse.papyrus.robotML.modelexplorer.popupmenu.generate"
label="Generate to Middleware/Simulator"
mnemonic="&amp;G"
@@ -60,6 +60,52 @@
</visibleWhen>
</menu>
</menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
+ <menu
+ icon="icons/robotml_16x16.png"
+ id="org.eclipse.papyrus.robotml.diagram.migrate"
+ label="RobotML">
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
+ </reference>
+ </visibleWhen>
+ <command
+ commandId="org.eclipse.papyrus.robotml.diagram.migrate"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ <or>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="di">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="uml">
+ </test>
+ <test
+ property="org.eclipse.core.resources.extension"
+ value="notation">
+ </test>
+ </or>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menu>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
@@ -68,6 +114,11 @@
id="org.eclipse.papyrus.robotML.generation.category"
name="RobotML generation Category">
</category>
+ <command
+ defaultHandler="org.eclipse.papyrus.robotml.diagram.common.migration.MigrateDiagramsHandler"
+ id="org.eclipse.papyrus.robotml.diagram.migrate"
+ name="Migrate RobotML diagrams from 0.9 to 1.0 version">
+ </command>
</extension>
<extension
point="org.eclipse.papyrus.uml.properties.languageEditor">
@@ -76,4 +127,18 @@
language="alf">
</editor>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
+ <contribution
+ file="viewpoints/robotml.configuration"
+ original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
+ </contribution>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
+ <editpolicyProvider
+ class="org.eclipse.papyrus.robotml.diagram.common.editpolicy.provider.RobotMLDiagramsEditPolicyProvider">
+ <Priority name="Low"/>
+ </editpolicyProvider>
+</extension>
</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/Activator.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/Activator.java
index d9859a9d797..9fd9541672f 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/Activator.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/Activator.java
@@ -19,7 +19,7 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
-
+
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.papyrus.robotml.diagram.common"; //$NON-NLS-1$
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java
deleted file mode 100644
index 2e3f8cf6f17..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/CustomPropertyLabelEditPolicy.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.common.editpolicies;
-
-
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
-
-
-public class CustomPropertyLabelEditPolicy extends PropertyLabelEditPolicy {
-
-
- public final static Collection<String> DEFAULT_ROBOTML_PROPERTY = Arrays.asList(ICustomAppearance.DISP_NAME, ICustomAppearance.DISP_TYPE);
-
- @Override
- public Collection<String> getDefaultDisplayValue() {
- // TODO Auto-generated method stub
- return DEFAULT_ROBOTML_PROPERTY;
- }
-
- // @Override
- // public int getCurrentDisplayValue() {
- // // TODO Auto-generated method stub
- // return DEFAULT_ROBOTML_PROPERTY;
- // }
-
-
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java
index b77aa846b19..2b482e68fee 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/PortNodeLabelDisplayEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
import org.eclipse.papyrus.uml.diagram.communication.custom.helper.RotationHelper;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
@@ -25,7 +26,7 @@ import org.eclipse.uml2.uml.Stereotype;
-public class PortNodeLabelDisplayEditPolicy extends StereotypeNodeLabelDisplayEditPolicy {
+public class PortNodeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/StereotypeNodeLabelDisplayEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/StereotypeNodeLabelDisplayEditPolicy.java
deleted file mode 100644
index cbc6b5a6957..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicies/StereotypeNodeLabelDisplayEditPolicy.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.common.editpolicies;
-
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class StereotypeNodeLabelDisplayEditPolicy forces the display if the stereotype icons of all the nodes of robotml diagrams
- */
-public class StereotypeNodeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy#stereotypeIconToDisplay()
- */
- @Override
- public Image stereotypeIconToDisplay() {
-
- // retrieve the first stereotype in the list of displayed stereotype
- if(getUMLElement() instanceof Element) {
- if(getUMLElement().getAppliedStereotypes().size() > 0) {
- Stereotype stereotypesToDisplay = getUMLElement().getAppliedStereotypes().get(0);
- return Activator.getIconElement(getUMLElement(), stereotypesToDisplay, false);
-
- }
- }
- return null;
-
-
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicy/provider/RobotMLDiagramsEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicy/provider/RobotMLDiagramsEditPolicyProvider.java
new file mode 100644
index 00000000000..4799ce927c4
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/editpolicy/provider/RobotMLDiagramsEditPolicyProvider.java
@@ -0,0 +1,92 @@
+/*****************************************************************************
+ * 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:
+ * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.robotml.diagram.common.editpolicy.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
+import org.eclipse.gmf.runtime.notation.LayoutConstraint;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.robotml.diagram.common.editpolicies.PortNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart;
+import org.eclipse.uml2.uml.Element;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+public class RobotMLDiagramsEditPolicyProvider extends AbstractProvider
+ implements IEditPolicyProvider {
+
+ public static String ROBOTML_ID = "RobotML";
+
+ public boolean provides(IOperation operation) {
+ CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation) operation;
+ if (!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
+ return false;
+ }
+ GraphicalEditPart gep = (GraphicalEditPart) epOperation.getEditPart();
+ String diagramType = gep.getNotationView().getDiagram().getType();
+ if (!CompositeStructureDiagramEditPart.MODEL_ID.equals(diagramType)) {
+ return false;
+ }
+
+ if (gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public void createEditPolicies(EditPart editPart) {
+
+ if (editPart.getModel() instanceof View) {
+ EObject element = ((View) editPart.getModel()).getElement();
+ if (element instanceof Element) {
+ if (((Element) element).getNearestPackage().getAppliedProfile(
+ ROBOTML_ID) != null)
+
+ // System.err.println(list.get(i).getProfile().getName());
+ if (editPart instanceof PortEditPart) {
+ NotificationListener editPolicy = new PortNodeLabelDisplayEditPolicy();
+ editPart.installEditPolicy(
+ AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY,
+ (EditPolicy) editPolicy);
+ Object model = editPart.getModel();
+ LayoutConstraint notifier = ((Shape) model)
+ .getLayoutConstraint();
+ if (model instanceof Shape) {
+ // to force refreshing the port icon when the
+ // diagram is opening
+ Notification notification = new ENotificationImpl(
+ (InternalEObject) notifier,
+ Notification.SET,
+ NotationPackage.eINSTANCE.getLocation_X(),
+ 0, 0);
+ editPolicy.notifyChanged(notification);
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/migration/MigrateDiagramsHandler.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/migration/MigrateDiagramsHandler.java
new file mode 100644
index 00000000000..712d5f2b1f4
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/migration/MigrateDiagramsHandler.java
@@ -0,0 +1,156 @@
+package org.eclipse.papyrus.robotml.diagram.common.migration;
+
+import java.io.IOException;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelsReader;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.gmfdiag.css.notation.CSSDiagramImpl;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.robotml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
+import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart;
+
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class MigrateDiagramsHandler extends AbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
+ if(currentSelection.isEmpty() || !(currentSelection instanceof IStructuredSelection)) {
+ return null;
+ }
+
+ IStructuredSelection selection = (IStructuredSelection)currentSelection;
+
+ Object selectedElement = selection.getFirstElement();
+
+ Object selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);
+
+
+
+ if(selectedAdapter instanceof IFile) {
+ final IFile selectedFile = (IFile)selectedAdapter;
+
+ //Load the model in background and add a user information
+ Job openDialogJob = new Job("Switch profile") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ monitor.beginTask("Migrating model...", IProgressMonitor.UNKNOWN);
+ ModelSet modelSet = new ModelSet();
+ ModelsReader reader = new ModelsReader();
+ reader.readModel(modelSet);
+
+
+ IPath workspacePath = selectedFile.getFullPath();
+
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+
+ ViewPrototype protoArchitecture = null;
+ ViewPrototype protoDatatypeDef = null;
+ ViewPrototype protoInterfaceDef = null;
+ ViewPrototype protoComponentDef = null;
+ for (ViewPrototype proto : PolicyChecker.getCurrent().getAllPrototypes()) {
+ if (proto.getLabel().contains("RobotML Architecture"))
+ protoArchitecture = proto;
+ else if (proto.getLabel().contains("RobotML Component")){
+ protoComponentDef = proto;
+ }else if (proto.getLabel().contains("RobotML Interface")){
+ protoInterfaceDef = proto;
+
+ }else if (proto.getLabel().contains("RobotML Datatype")){
+ protoDatatypeDef = proto;
+ }
+ }
+
+
+ try {
+ modelSet.loadModels(workspaceURI);
+ //do the diagrams migration
+ NotationModel notationModel = (NotationModel)modelSet.getModel(NotationModel.MODEL_ID);
+ if(notationModel != null) {
+ Resource mainNotationResource = notationModel.getResource();
+
+ Iterator<EObject> allContents = mainNotationResource.getAllContents();
+
+ while(allContents.hasNext()) {
+ EObject currentElement = allContents.next();
+
+ if (currentElement instanceof CSSDiagramImpl){
+ // 1. Changing the type of the diagram
+ //System.err.println(currentElement);
+ if (((CSSDiagramImpl) currentElement).getType().equalsIgnoreCase("architecture") )
+ {
+ ((CSSDiagramImpl) currentElement).setType(CompositeStructureDiagramEditPart.MODEL_ID);
+ DiagramUtils.setPrototype((CSSDiagramImpl) currentElement, protoArchitecture);
+ DiagramUtils.setOwner(((CSSDiagramImpl) currentElement), ((CSSDiagramImpl) currentElement).getElement());
+
+ }else if(((CSSDiagramImpl) currentElement).getType().equalsIgnoreCase("componentdef")){
+ ((CSSDiagramImpl) currentElement).setType(CompositeStructureDiagramEditPart.MODEL_ID);
+ DiagramUtils.setPrototype((CSSDiagramImpl) currentElement, protoComponentDef);
+ DiagramUtils.setOwner(((CSSDiagramImpl) currentElement), ((CSSDiagramImpl) currentElement).getElement());
+ }
+
+ else if (((CSSDiagramImpl) currentElement).getType().equalsIgnoreCase("datatypedef") )
+ {
+ ((CSSDiagramImpl) currentElement).setType(ModelEditPart.MODEL_ID);
+ DiagramUtils.setPrototype((CSSDiagramImpl) currentElement, protoDatatypeDef);
+ DiagramUtils.setOwner(((CSSDiagramImpl) currentElement), ((CSSDiagramImpl) currentElement).getElement());
+
+ }else if(((CSSDiagramImpl) currentElement).getType().equalsIgnoreCase("interfacedef")){
+ ((CSSDiagramImpl) currentElement).setType(ModelEditPart.MODEL_ID);
+ DiagramUtils.setPrototype((CSSDiagramImpl) currentElement, protoInterfaceDef);
+ DiagramUtils.setOwner(((CSSDiagramImpl) currentElement), ((CSSDiagramImpl) currentElement).getElement());
+ }
+
+ }
+
+
+ }//end while
+ mainNotationResource.save(null);
+
+ }
+
+ } catch (ModelMultiException e) {
+ Activator.log.error(e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ } catch (IOException e) {
+
+ Activator.log.error(e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+
+ openDialogJob.setUser(true);
+
+ openDialogJob.schedule();
+ }
+
+ return null;
+ }
+
+}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
index 2b79a800891..20f490570c1 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/src/org/eclipse/papyrus/robotml/diagram/common/utils/RobotmlSelectionTester.java
@@ -12,13 +12,24 @@
package org.eclipse.papyrus.robotml.diagram.common.utils;
import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.RobotML.RobotMLPackage;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelsReader;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForSelection;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
import org.eclipse.papyrus.robotml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
@@ -66,6 +77,8 @@ public class RobotmlSelectionTester extends PropertyTester {
protected boolean testRobotmlModelNature(Object receiver) {
boolean isRobotmlModel = false;
+
+
EObject root = getRoot(receiver);
if(root instanceof Package) {
return (((Package)root).getAppliedProfile("RobotML") != null);
@@ -95,15 +108,46 @@ public class RobotmlSelectionTester extends PropertyTester {
}
try {
+ //this is the case where the selection is on the Project Explorer
+ IStructuredSelection selectionstructured = (IStructuredSelection)selection;
+
+ Object selectedElement = selectionstructured.getFirstElement();
+
+ Object selectedAdapter = Platform.getAdapterManager().getAdapter(selectedElement, IFile.class);
+
+
+ if(selectedAdapter instanceof IFile) {
+ final IFile selectedFile = (IFile)selectedAdapter;
+ ModelSet modelSet = new ModelSet();
+ ModelsReader reader = new ModelsReader();
+ reader.readModel(modelSet);
+
+
+ IPath workspacePath = selectedFile.getFullPath();
+
+ URI workspaceURI = URI.createPlatformResourceURI(workspacePath.toString(), true);
+ modelSet.loadModels(workspaceURI);
+
+ UmlModel openedModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);
+ if(openedModel != null) {
+ root = openedModel.lookupRoot();
+ }
+ }else{
+ //this is the case where the selection is on the Model Explorer
ServiceUtilsForSelection serviceUtils = ServiceUtilsForSelection.getInstance();
UmlModel openedModel = (UmlModel)serviceUtils.getModelSet(selection).getModel(UmlModel.MODEL_ID);
if(openedModel != null) {
root = openedModel.lookupRoot();
- }
+ }}
+
} catch (ServiceException e) {
- //Ignored: The selection cannot be used to retrieve the ServicesRegistry
+ //The selection cannot be used to retrieve the ServicesRegistry
+ Activator.log.error(e);
} catch (NotFoundException e) {
Activator.log.error(e);
+ } catch (ModelMultiException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration
new file mode 100755
index 00000000000..0d82eda5809
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration:PapyrusConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" defaultStakeholder="#//@stakeholders.0" metamodel="http://www.eclipse.org/uml2/5.0.0/UML#/">
+ <stakeholders name="RobotML Modeler"/>
+ <viewpoints xsi:type="configuration:PapyrusViewpoint" name="Default Papyrus Viewpoint">
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Architecture Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="CompositeStructure" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/architecture/architecture.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ <paletteRules permit="false" element="composite.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Component Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="CompositeStructure" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/componentdef/componentdef.palette.xml" customStyle="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/css/style.css">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ <paletteRules permit="false" element="composite.group.*"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Datatype Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypeD.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/datatypedef/datatypedef.palette.xml">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ <paletteRules permit="false" element="clazz.group.*"/>
+ <paletteRules permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="RobotML Interface Definition Diagram" icon="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfaceI.gif" profiles="http://Papyrus/RobotML/1#/" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0" customPalette="platform:/plugin/org.eclipse.papyrus.robotml.diagram.common/diagrams/interfacedef/interfacedef.palette.xml">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ <paletteRules permit="false" element="clazz.group.*"/>
+ <paletteRules permit="false" element="org.eclipse.papyrus.robotml.diagram.clazz"/>
+ </modelKinds>
+ </viewpoints>
+ <categories name="robotML"/>
+</configuration:PapyrusConfiguration>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.MF
deleted file mode 100644
index e228af79dd0..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,39 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.emf.common.ui;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.robotml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.componentdef.Act
- ivator
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.componentdef;
- singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.gen.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.gen.MF
deleted file mode 100644
index 8f461338818..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/META-INF/MANIFEST.gen.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.componentdef;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.componentdef.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.diagram.common,
- org.eclipse.papyrus.core.adaptor.gmf,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.diagram.composite,
- org.eclipse.papyrus.preferences
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.gen.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.gen.properties
deleted file mode 100644
index ca6d14e16f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.gen.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.properties
deleted file mode 100644
index 71bd08b3798..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = src/,\
- src-gen/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- palettes/,\
- model/,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/model/Proteus.Componentdef.idgen b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/model/Proteus.Componentdef.idgen
deleted file mode 100644
index c2fe08434f3..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/model/Proteus.Componentdef.idgen
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<diagramcontent:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagramcontent="http://www.eclipse.org/papyrus/0.7.0/diagramcontent" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" name="Componentdef" label="Proteus Component Definition Diagram" icon="icons/obj16/componentdef.gif" hint="componentdef" javaPackagePrefix="org.eclipse.papyrus.robotml.diagram.componentdef" javaClassPrefix="ComponentdefDiagram" language="proteus" createCommandLabel="Create a new Proteus Component Definition Diagram">
- <diagramEditPart name="ComponentdefEditPart">
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.composite.edit.policies.CompositeStructureDiagramItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy" key="&quot;RemoveOrphanView&quot;"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy.ComponentdefDiagramDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
- </diagramEditPart>
- <inheritedDiagrams name="CompositeDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy" paletteToolPrefix="composite.tool">
- <genInheritedEditor href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#CompositeStructure"/>
- <genNodes name="Component">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.10"/>
- </genNodes>
- <genNodes name="" customPreferencePage="">
- <genNode xsi:type="gmfgen:GenChildSideAffixedNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.0"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.48"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@topLevelNodes.53"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.2"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.19"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.27"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.15"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@childNodes.32"/>
- </genNodes>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.2"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.composite/model/compositediagram.gmfgen#/0/@diagram/@links.1"/>
- </genLinks>
- </inheritedDiagrams>
-</diagramcontent:Diagram>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.gen.xml
deleted file mode 100644
index 5556da299d7..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/palettes/componentdef.palette.gen.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.PROTEUS_Componentdef__Tools" name="Tools">
- <aspectTool description="Create a new Component" id="componentdef.tool.component"
- name="Component" refToolId="composite.tool.class">
- </aspectTool>
- <aspectTool description="Create a new Port" id="componentdef.tool.port"
- name="Port" refToolId="composite.tool.port">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="componentdef.tool.comment"
- name="Comment" refToolId="composite.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="componentdef.tool.constraint"
- name="Constraint" refToolId="composite.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Property" id="componentdef.tool.property"
- name="Property" refToolId="composite.tool.property">
- </aspectTool>
- <aspectTool description="Create a new Package" id="componentdef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Package" id="componentdef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="componentdef.tool.comment"
- name="Comment" refToolId="composite.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Class" id="componentdef.tool.class"
- name="Class" refToolId="composite.tool.class">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="componentdef.tool.constraint"
- name="Constraint" refToolId="composite.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new ConstraintConstrainedElement" id="componentdef.tool.constraintconstrainedelement"
- name="ConstraintConstrainedElement" refToolId="composite.tool.link">
- </aspectTool>
- <aspectTool description="Create a new CommentAnnotatedElement" id="componentdef.tool.commentannotatedelement"
- name="CommentAnnotatedElement" refToolId="composite.tool.link">
- </aspectTool>
- </drawer>
- </content>
-</paletteDefinition>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.gen.xml
deleted file mode 100644
index 4b249850c3c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.gen.xml
+++ /dev/null
@@ -1,409 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramCreateCommand"
- icon="icons/obj16/componentdef.gif"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- language="proteus"
- label="Proteus Component Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramEditorFactory"
- icon="icons/obj16/componentdef.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- name="Create a new Proteus Component Definition Diagram"
- description="Create a new Proteus Component Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif" label="Create a new Proteus Component Definition Diagram"
- style="push" tooltip="Create a new Proteus Component Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif" label="Create a new Proteus Component Definition Diagram"
- style="push" tooltip="Create a new Proteus Component Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif"
- label="Create a new Proteus Component Definition Diagram"
- style="push"
- tooltip="Create a new Proteus Component Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.diagram.common.paletteDefinition"
- name="PROTEUS_Componentdef">
-
- <paletteDefinition ID="PROTEUS_Componentdef"
- class="org.eclipse.papyrus.diagram.common.service.PluginPaletteProvider"
- name="PROTEUS_Componentdef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/componentdef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.componentdef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="componentdef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.InheritedCompositeDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2073" = CLASS
- "3069" = PORT_CN
- "2109" = COMMENT
- "2114" = CONSTRAINT
- "3070" = PROPERTY_CN
- "3009" = PACKAGE_CN
- "2007" = PACKAGE
- "3097" = COMMENT_CN
- "3085" = CLASS_CN
- "3120" = CONSTRAINT_CN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2073, 3069, 2109, 2114, 3070, 3009, 2007, 3097, 3085, 3120"/>
-
- <!--
- "4003" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4002" = COMMENT_ANNOTATED_ELEMENT
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4003, 4002"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Class" -->
- <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Class"/>
- </object>
-
- <!-- "uml.Port" -->
- <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Port"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Class, uml.Port, uml.Comment, uml.Constraint, uml.Property, uml.Package"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.componentdef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="componentdef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.InheritedCompositeDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2073" = CLASS
- "5156" = CLASS_LABEL_COMPOSITE_NAME_HINT
- "7073" = CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3069" = PORT_CN
- "5125" = PORT_CN_LABEL_NAME_HINT
- "6029" = PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT
- "2109" = COMMENT
- "5192" = COMMENT_LABEL_BODY_HINT
- "2114" = CONSTRAINT
- "5197" = CONSTRAINT_LABEL_NAME_HINT
- "6039" = CONSTRAINT_LABEL_SPECIFICATION_HINT
- "3070" = PROPERTY_CN
- "5126" = PROPERTY_CN_LABEL_PART_NAME_HINT
- "7077" = PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3097" = COMMENT_CN
- "5150" = COMMENT_CN_LABEL_BODY_HINT
- "3085" = CLASS_CN
- "5155" = CLASS_CN_LABEL_COMPOSITE_NAME_HINT
- "7060" = CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3120" = CONSTRAINT_CN
- "6048" = CONSTRAINT_CN_LABEL_NAME_HINT
- "6049" = CONSTRAINT_CN_LABEL_SPECIFICATION_HINT
- -->
- <object
- id="CLASS"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2073, 5156, 7073"/>
- </object>
- <object
- id="PORT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3069, 5125, 6029"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2109, 5192"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2114, 5197, 6039"/>
- </object>
- <object
- id="PROPERTY_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3070, 5126, 7077"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3097, 5150"/>
- </object>
- <object
- id="CLASS_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3085, 5155, 7060"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3120, 6048, 6049"/>
- </object>
-
-
- <!--
- "4003" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4002" = COMMENT_ANNOTATED_ELEMENT
- -->
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4003"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002"/>
- </object>
-
- <context views="CLASS, PORT_CN, COMMENT, CONSTRAINT, PROPERTY_CN, PACKAGE_CN, PACKAGE, COMMENT_CN, CLASS_CN, CONSTRAINT_CN"/>
- <context views="CONSTRAINT_CONSTRAINED_ELEMENT, COMMENT_ANNOTATED_ELEMENT"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- name="Componentdef Diagram"
- category="org.eclipse.papyrus.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentdefDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentPreferencePage"
- name="Component">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PortPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PortPreferencePage"
- name="Port">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ClassPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ClassPreferencePage"
- name="Class">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
-</extension>
-
-</plugin> \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.xml
deleted file mode 100644
index 93b627398d7..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.xml
+++ /dev/null
@@ -1,440 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramCreateCommand"
- icon="icons/obj16/componentdef.gif"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- language="robotML"
- label="RobotML Component Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramEditorFactory"
- icon="icons/obj16/componentdef.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- name="Create a new RobotML Component Definition Diagram"
- description="Create a new RobotML Component Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.componentdef.ComponentdefDiagramCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif" label="Create a new RobotML Component Definition Diagram"
- style="push" tooltip="Create a new RobotML Component Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <!--menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif" label="Create a new Proteus Component Definition Diagram"
- style="push" tooltip="Create a new Proteus Component Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution-->
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.robotml.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif" label="Create a new RobotML Component Definition Diagram"
- style="push" tooltip="Create a new RobotML Component Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.componentdef.CreateCommand"
- icon="icons/obj16/componentdef.gif"
- label="Create a new RobotML Component Definition Diagram"
- style="push"
- tooltip="Create a new RobotML Component Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="PROTEUS_Componentdef">
-
- <paletteDefinition ID="ROBOTML_Componentdef"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="ROBOTML_Componentdef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/componentdef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.componentdef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="componentdef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from CompositeDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.InheritedCompositeDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2073" = CLASS
- "3069" = PORT_CN
- "2109" = COMMENT
- "2114" = CONSTRAINT
- "3070" = PROPERTY_CN
- "3009" = PACKAGE_CN
- "2007" = PACKAGE
- "3097" = COMMENT_CN
- "3085" = CLASS_CN
- "3120" = CONSTRAINT_CN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2073, 3069, 2109, 2114, 3070, 3009, 2007, 3097, 3085, 3120"/>
-
- <!--
- "4003" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4002" = COMMENT_ANNOTATED_ELEMENT
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4003, 4002"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Class" -->
- <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Class"/>
- </object>
-
- <!-- "uml.Port" -->
- <object id="uml.Port" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Port"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Class, uml.Port, uml.Comment, uml.Constraint, uml.Property, uml.Package"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.componentdef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="componentdef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from CompositeDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.InheritedCompositeDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2073" = CLASS
- "5156" = CLASS_LABEL_COMPOSITE_NAME_HINT
- "7073" = CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3069" = PORT_CN
- "5125" = PORT_CN_LABEL_NAME_HINT
- "6029" = PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT
- "2109" = COMMENT
- "5192" = COMMENT_LABEL_BODY_HINT
- "2114" = CONSTRAINT
- "5197" = CONSTRAINT_LABEL_NAME_HINT
- "6039" = CONSTRAINT_LABEL_SPECIFICATION_HINT
- "3070" = PROPERTY_CN
- "5126" = PROPERTY_CN_LABEL_PART_NAME_HINT
- "7077" = PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3097" = COMMENT_CN
- "5150" = COMMENT_CN_LABEL_BODY_HINT
- "3085" = CLASS_CN
- "5155" = CLASS_CN_LABEL_COMPOSITE_NAME_HINT
- "7060" = CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT
- "3120" = CONSTRAINT_CN
- "6048" = CONSTRAINT_CN_LABEL_NAME_HINT
- "6049" = CONSTRAINT_CN_LABEL_SPECIFICATION_HINT
- -->
- <object
- id="CLASS"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2073, 5156, 7073"/>
- </object>
- <object
- id="PORT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3069, 5125, 6029"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2109, 5192"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2114, 5197, 6039"/>
- </object>
- <object
- id="PROPERTY_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3070, 5126, 7077"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3097, 5150"/>
- </object>
- <object
- id="CLASS_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3085, 5155, 7060"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3120, 6048, 6049"/>
- </object>
-
-
- <!--
- "4003" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4002" = COMMENT_ANNOTATED_ELEMENT
- -->
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4003"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002"/>
- </object>
-
- <context views="CLASS, PORT_CN, COMMENT, CONSTRAINT, PROPERTY_CN, PACKAGE_CN, PACKAGE, COMMENT_CN, CLASS_CN, CONSTRAINT_CN"/>
- <context views="CONSTRAINT_CONSTRAINED_ELEMENT, COMMENT_ANNOTATED_ELEMENT"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.CustomComponentDefDiagramEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- name="Componentdef Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentdefDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentPreferencePage"
- name="Component">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PortPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PortPreferencePage"
- name="Port">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ClassPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ClassPreferencePage"
- name="Class">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.componentdef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
-</extension>
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
- <decoratorProvider
- class="org.eclipse.papyrus.robotml.diagram.componentdef.provider.UMLValidationDecoratorProvider">
- <Priority
- name="Lowest">
- </Priority>
- <object
- class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)"
- id="PRIMARY_VIEW">
- </object>
- <context
- decoratorTargets="PRIMARY_VIEW">
- </context>
- </decoratorProvider>
-</extension>
-
-
-</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/Activator.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/Activator.java
deleted file mode 100644
index 3638db1e83b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/Activator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentdefDiagramPreferenceInitializer;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.robotml.diagram.componentdef";
-
- /** The plug-in shared instance */
- private static Activator plugin;
-
- /** The logging helper */
- public static LogHelper log;
-
- /** The plug-in Preference store */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
-
- /** Default constructor */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // register the login helper
- log = new LogHelper(plugin);
-
- // register the preference store
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
-
- // Preferences initialization
- ComponentdefDiagramPreferenceInitializer diagramPreferenceInitializer = new ComponentdefDiagramPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getInstance() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- *
- * @return Shared Preference Store.
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
- return store;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramCreateCommand.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramCreateCommand.java
deleted file mode 100644
index 42faad73b28..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramCreateCommand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ComponentdefDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- @Override
- protected String getDefaultDiagramName() {
- return "ComponentsDiagram";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return ComponentdefDiagramEditPart.DIAGRAM_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramEditorFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramEditorFactory.java
deleted file mode 100644
index f7674a0ce33..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramEditorFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ComponentdefDiagramEditorFactory extends GmfEditorFactory {
-
- public ComponentdefDiagramEditorFactory() {
- super(ComponentdefDiagramForMultiEditor.class, ComponentdefDiagramEditPart.DIAGRAM_ID);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramForMultiEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramForMultiEditor.java
deleted file mode 100644
index df4d2b32a3d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/ComponentdefDiagramForMultiEditor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.robotml.diagram.componentdef.part.ComponentdefDiagramEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
- *
- */
-public class ComponentdefDiagramForMultiEditor extends ComponentdefDiagramEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/componentdef.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(ComponentdefDiagramForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- *
- */
- public ComponentdefDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.robotml.diagram.componentdef.EditingDomain";
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/part/ComponentdefDiagramEditPart.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/part/ComponentdefDiagramEditPart.java
deleted file mode 100644
index d1a36c8ab7d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/part/ComponentdefDiagramEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.edit.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy.ComponentdefDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.policies.CompositeStructureDiagramItemSemanticEditPolicy;
-
-public class ComponentdefDiagramEditPart extends DiagramEditPart {
-
- public final static String DIAGRAM_ID = "componentdef"; //$NON-NLS-1$
-
- public ComponentdefDiagramEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CompositeStructureDiagramItemSemanticEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ComponentdefDiagramDragDropEditPolicy());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/ComponentdefDiagramDragDropEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/ComponentdefDiagramDragDropEditPolicy.java
deleted file mode 100644
index ed8991f07c1..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/ComponentdefDiagramDragDropEditPolicy.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramElementTypes;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.CustomDiagramDragDropEditPolicy;
-
-/** Customization of the DND edit policy for the Componentdef Diagram */
-public class ComponentdefDiagramDragDropEditPolicy extends CustomDiagramDragDropEditPolicy {
-
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return new Integer(getNodeGraphicalHint(containerView, domainElement));
- }
-
- protected String getNodeGraphicalHint(View containerView, EObject domainElement) {
- String UNDEFINED = "-1";
-
- String containerGraphicalHint = containerView.getType();
- if(containerGraphicalHint == null) {
- // Cannot guess domain element graphical hint.
- return UNDEFINED;
- }
-
- // Fill the semantic hint during the drop
- // Elements inherited from CompositeDiagram
- // Dropping Class
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CLASS.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint();
- }
-
- }
- // Dropping Port
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ComponentdefDiagramElementTypes.CLASS.getSemanticHint().equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint().equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint().equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
-
- }
- // Dropping Comment
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.COMMENT.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint();
- }
-
- }
- // Dropping Constraint
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CONSTRAINT.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
-
- }
- // Dropping Property
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
-
- }
- // Dropping Package
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(ComponentdefDiagramElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PACKAGE.getSemanticHint();
- }
-
- }
-
- return UNDEFINED;
- }
-
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- return new Integer(getLinkGraphicalHint(domainElement));
- }
-
- protected String getLinkGraphicalHint(EObject domainElement) {
- String UNDEFINED = "-1";
-
-
- return UNDEFINED;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/factory/ComponentdefDiagramViewFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/factory/ComponentdefDiagramViewFactory.java
deleted file mode 100644
index 0f19c01a138..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/factory/ComponentdefDiagramViewFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.factory;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-
-public class ComponentdefDiagramViewFactory extends DiagramViewFactory {
-
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/part/ComponentdefDiagramEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/part/ComponentdefDiagramEditor.java
deleted file mode 100644
index 382f8200225..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/part/ComponentdefDiagramEditor.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.part;
-
-import java.util.EventObject;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class ComponentdefDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.robotml.diagram.componentdef.part.ComponentdefDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public ComponentdefDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
- }
-
- /**
- * @generated
- */
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- public String getContributorId() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @generated
- */
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
-
- // Replace diagram contextual menu removing default
- // delete from model action.
- DiagramContextMenuProvider provider = (DiagramContextMenuProvider)getDiagramGraphicalViewer().getContextMenu();
- Set<String> menuExclusions = provider.getExclusionSet();
- menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
- provider.setExclusionSet(menuExclusions);
- }
-
- /**
- * @generated
- */
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- savedOperation = getOperationHistory().getUndoOperation(getUndoContext());
- }
-
- /**
- * @generated
- */
- public boolean isDirty() {
- IUndoableOperation op = getOperationHistory().getUndoOperation(getUndoContext());
- return savedOperation != op;
- }
-
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java
deleted file mode 100644
index 8971a69387a..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ClassPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Class";
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
-
- /** The compartment titles default visibility for preferences */
- public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
-
- compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
-
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
- Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
- }
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "ClassCompositeCompartment" };
-
- public ClassPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Class"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- // set the true value for the compartment visibility
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentNamesList() {
- for(String name : compartmentDefaultVisibilityMap.keySet()) {
- this.compartmentNamesList.add(name);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentTitlesList() {
- for(String name : compartmentTitleDefaultVisibilityMap.keySet()) {
- this.compartmentTitlesList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentAnnotatedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentAnnotatedElementPreferencePage.java
deleted file mode 100644
index a127cde2b2b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentAnnotatedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class CommentAnnotatedElementPreferencePage extends ComponentdefDiagramLinkPreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_CommentAnnotatedElement";
-
- public CommentAnnotatedElementPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentPreferencePage.java
deleted file mode 100644
index 6cf4a9df4b4..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class CommentPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Comment";
-
-
- public CommentPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java
deleted file mode 100644
index ab4dac5b8ee..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-
-public class ComponentPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Class";
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
-
- /** The compartment titles default visibility for preferences */
- public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentDefaultVisibilityMap.put("structure", Boolean.TRUE); //$NON-NLS-1$
-
- compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentTitleDefaultVisibilityMap.put("structure", Boolean.FALSE); //$NON-NLS-1$
-
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
- Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
- }
-
- /** Constructor */
- public ComponentPreferencePage() {
- super();
- setPreferenceKey(prefKey); //$NON-NLS-1$
- }
-
- /** Default preferences initializer */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentNamesList() {
- for(String name : compartmentDefaultVisibilityMap.keySet()) {
- this.compartmentNamesList.add(name);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentTitlesList() {
- for(String name : compartmentTitleDefaultVisibilityMap.keySet()) {
- this.compartmentTitlesList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramGeneralPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramGeneralPreferencePage.java
deleted file mode 100644
index 9978f151360..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramGeneralPreferencePage.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-
-public class ComponentdefDiagramGeneralPreferencePage extends DiagramPreferencePage {
-
- public ComponentdefDiagramGeneralPreferencePage() {
- setPreferenceStore(Activator.getInstance().getPreferenceStore());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramLinkPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramLinkPreferencePage.java
deleted file mode 100644
index 45145d2f7d8..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramLinkPreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-
-public class ComponentdefDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramNodePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramNodePreferencePage.java
deleted file mode 100644
index 78a7b5ff873..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramNodePreferencePage.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.TreeMap;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-import org.eclipse.swt.widgets.Composite;
-
-public class ComponentdefDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /** The list owning the names of compartments */
- protected List<String> compartmentNamesList;
-
- /** The list owning the names of compartment that have a title */
- protected List<String> compartmentTitlesList;
-
- /** The list of label names for this node */
- protected List<String> labelsList;
-
- /** Constructor */
- public ComponentdefDiagramNodePreferencePage() {
- this.labelsList = new ArrayList<String>();
- this.compartmentNamesList = new ArrayList<String>();
- this.compartmentTitlesList = new ArrayList<String>();
-
- initializeLabelsList();
- initializeCompartmentNamesList();
- initializeCompartmentTitlesList();
-
- Collections.unmodifiableList(labelsList);
- Collections.unmodifiableList(compartmentNamesList);
- Collections.unmodifiableList(compartmentTitlesList);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // Add compartments visibility group
- if(!compartmentNamesList.isEmpty()) {
- OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
- addAbstractGroup(compartmentGroup);
- }
-
- // Add label visibility group
- if(!labelsList.isEmpty()) {
- OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
- addAbstractGroup(compartmentGroup);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-
- /** Initialize the list containing names of labels. */
- protected void initializeLabelsList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartments. */
- protected void initializeCompartmentNamesList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartment that have titles. */
- protected void initializeCompartmentTitlesList() {
- // Implemented by subclasses.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, String> getLabelRole() {
- return new TreeMap<String, String>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- return new TreeMap<String, Boolean>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentsList() {
- compartmentsList = Collections.emptyList();
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramPreferenceInitializer.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramPreferenceInitializer.java
deleted file mode 100644
index 578f08dd632..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentdefDiagramPreferenceInitializer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-
-public class ComponentdefDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- protected IPreferenceStore getPreferenceStore() {
- return Activator.getInstance().getPreferenceStore();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ComponentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PortPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PropertyPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ClassPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.ConstraintConstrainedElementPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.componentdef.preferences.CommentAnnotatedElementPreferencePage.initDefaults(store);
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintConstrainedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintConstrainedElementPreferencePage.java
deleted file mode 100644
index 3a6e332f2c2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintConstrainedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ConstraintConstrainedElementPreferencePage extends ComponentdefDiagramLinkPreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement";
-
- public ConstraintConstrainedElementPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index bbac38b7a9d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ConstraintPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Constraint";
-
-
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java
deleted file mode 100644
index cf7a560c739..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class PackagePreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Package";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "PackageableElementCompartment" };
-
- public PackagePreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java
deleted file mode 100644
index 1b690d02dfe..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class PortPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Port";
-
-
- public PortPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Port"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java
deleted file mode 100644
index 2394468a886..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class PropertyPreferencePage extends ComponentdefDiagramNodePreferencePage {
-
- public static String prefKey = ComponentdefDiagramEditPart.DIAGRAM_ID + "_Property";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "PropertyPartCompartment" };
-
- public PropertyPreferencePage() {
- super();
- setPreferenceKey(ComponentdefDiagramEditPart.DIAGRAM_ID + "_Property"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPartProvider.java
deleted file mode 100644
index 3ccfe7dfe06..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPartProvider.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-
-public class ComponentdefDiagramEditPartProvider extends AbstractEditPartProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is Componentdef Diagram
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(view.getType())) {
- return true;
- }
-
- // nodeMap.put(AppliedStereotypeConpartmentEditPart.ID, AppliedStereotypeConpartmentEditPart.class);
- // nodeMap.put(AppliedStereotypePropertyEditPart.ID, AppliedStereotypeMultilinePropertyEditPart.class);
-
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramEditPartClass(View view) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(view.getType())) {
- return ComponentdefDiagramEditPart.class;
- }
-
- Activator.log.error(new Exception("Could not create EditPart."));
- return null;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPolicyProvider.java
deleted file mode 100644
index 9e0872f04e4..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramEditPolicyProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy.ComponentdefDiagramDragDropEditPolicy;
-
-public class ComponentdefDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- public boolean provides(IOperation operation) {
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartCompartmentEditPartCN) {
- return true;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.CommentEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ClassCompositeCompartmentEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.ConstraintEditPartCN) {
- return true;
- }
-
- return false;
- }
-
- public void createEditPolicies(EditPart editPart) {
- editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ComponentdefDiagramDragDropEditPolicy());
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramElementTypes.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramElementTypes.java
deleted file mode 100644
index 5a6ecd6b46c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramElementTypes.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-public class ComponentdefDiagramElementTypes extends AbstractElementTypeEnumerator {
-
- /** ********************************************************* */
- /** Proteus Component Definition Diagram specific elements **************** */
- /** ********************************************************* */
-
- /** Proteus Component Definition Diagram :: Diagram */
- public static final IHintedType COMPONENTDEF_DIAGRAM = (IHintedType)getElementType("componentdef"); //$NON-NLS-1$
-
-
-
-
- /** ********************************************************* */
- /** Proteus Component Definition Diagram - CompositeDiagram related elements */
- /** ********************************************************* */
-
-
- /** CompositeDiagram :: CLASS */
- public static final IHintedType CLASS = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Class_2073"); //$NON-NLS-1$
-
- public static final String CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT = "7073";
-
- public static final String CLASS_LABEL_COMPOSITE_NAME_HINT = "5156";
-
- /** CompositeDiagram :: PORT_CN */
- public static final IHintedType PORT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Port_3069"); //$NON-NLS-1$
-
- public static final String PORT_CN_LABEL_NAME_HINT = "5125";
-
- public static final String PORT_CN_LABEL_APPLIED_STEREOTYPE_HINT = "6029";
-
- /** CompositeDiagram :: COMMENT */
- public static final IHintedType COMMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Comment_2109"); //$NON-NLS-1$
-
- public static final String COMMENT_LABEL_BODY_HINT = "5192";
-
- /** CompositeDiagram :: CONSTRAINT */
- public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_NAME_HINT = "5197";
-
- public static final String CONSTRAINT_LABEL_SPECIFICATION_HINT = "6039";
-
- /** CompositeDiagram :: PROPERTY_CN */
- public static final IHintedType PROPERTY_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Property_3070"); //$NON-NLS-1$
-
- public static final String PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT = "7077";
-
- public static final String PROPERTY_CN_LABEL_PART_NAME_HINT = "5126";
-
- /** CompositeDiagram :: PACKAGE_CN */
- public static final IHintedType PACKAGE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_3009"); //$NON-NLS-1$
-
- public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7010";
-
- public static final String PACKAGE_CN_LABEL_NAME_HINT = "5017";
-
- /** CompositeDiagram :: PACKAGE */
- public static final IHintedType PACKAGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_2007"); //$NON-NLS-1$
-
- public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7016";
-
- public static final String PACKAGE_LABEL_NAME_HINT = "5026";
-
- /** CompositeDiagram :: COMMENT_CN */
- public static final IHintedType COMMENT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Comment_3097"); //$NON-NLS-1$
-
- public static final String COMMENT_CN_LABEL_BODY_HINT = "5150";
-
- /** CompositeDiagram :: CLASS_CN */
- public static final IHintedType CLASS_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Class_3085"); //$NON-NLS-1$
-
- public static final String CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT = "7060";
-
- public static final String CLASS_CN_LABEL_COMPOSITE_NAME_HINT = "5155";
-
- /** CompositeDiagram :: CONSTRAINT_CN */
- public static final IHintedType CONSTRAINT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_CN_LABEL_NAME_HINT = "6048";
-
- public static final String CONSTRAINT_CN_LABEL_SPECIFICATION_HINT = "6049";
-
-
- /** CompositeDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
- public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.ConstraintConstrainedElement_4003"); //$NON-NLS-1$
-
- /** CompositeDiagram :: COMMENT_ANNOTATED_ELEMENT */
- public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.composite.CommentAnnotatedElement_4002"); //$NON-NLS-1$
-
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramViewProvider.java
deleted file mode 100644
index 46b01ff8b8f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/ComponentdefDiagramViewProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.componentdef.factory.ComponentdefDiagramViewFactory;
-
-public class ComponentdefDiagramViewProvider extends AbstractViewProvider {
-
- @Override
- protected boolean provides(CreateDiagramViewOperation operation) {
-
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(operation.getSemanticHint())) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramKind)) {
- return ComponentdefDiagramViewFactory.class;
- }
-
- Activator.log.error(new Exception("Could not create View."));
- return null;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramEditPartProvider.java
deleted file mode 100644
index da53342f4b9..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramEditPartProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLEditPartProvider;
-
-
-public class InheritedCompositeDiagramEditPartProvider extends UMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is a Componentdef Diagram
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(view.getDiagram().getType())) {
- return false;
- }
-
- // Test supported inherited types
- EObject eobject = view.getElement();
-
- /** Nodes (and ChildLabelNodes) *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Class) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Port) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Comment) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Constraint) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Property) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Package) {
- return true;
- }
-
-
- // Additional test needed here to decide whether to support Feature type links.
- // As feature type link are not related to a MetaClass from the domain model
- // they are not already handled by previous tests.
- String hint = view.getType();
-
- /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
- if(ComponentdefDiagramElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
- if(ComponentdefDiagramElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- }
- return false;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramViewProvider.java
deleted file mode 100644
index 872ec2be0ba..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/InheritedCompositeDiagramViewProvider.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.Activator;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.providers.UMLViewProvider;
-
-public class InheritedCompositeDiagramViewProvider extends UMLViewProvider {
-
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- // No need to override here, assuming provides is correctly implemented.
- Edge createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
-
- if(createdEdge == null) {
- Activator.log.error(new Exception("Could not create Edge."));
- }
-
- return createdEdge;
- }
-
- protected boolean provides(CreateViewForKindOperation op) {
-
- // This provider is registered for Internal Block Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- return true;
- }
-
- @Override
- protected boolean provides(CreateEdgeViewOperation op) {
-
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
-
- // This provider is registered for Componentdef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(elementType == ComponentdefDiagramElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
- return true;
- }
- if(elementType == ComponentdefDiagramElementTypes.COMMENT_ANNOTATED_ELEMENT) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected boolean provides(CreateNodeViewOperation op) {
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
- // Get the type of the container
- String containerGraphicalType = op.getContainerView().getType();
-
- // This provider is registered for Componentdef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the ElementType and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
- if(elementType == ComponentdefDiagramElementTypes.CLASS) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.PORT_CN) {
- if(ComponentdefDiagramElementTypes.CLASS.getSemanticHint().equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint().equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint().equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.COMMENT) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.CONSTRAINT) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.PROPERTY_CN) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.PACKAGE_CN) {
- if(ComponentdefDiagramElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.PACKAGE) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.COMMENT_CN) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.CLASS_CN) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ComponentdefDiagramElementTypes.CONSTRAINT_CN) {
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
-
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
-
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Class TopNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Class ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Class ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ComponentdefDiagramElementTypes.CLASS.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return false;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return false;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(ComponentdefDiagramElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
- if(ComponentdefDiagramElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return true;
- }
-
- }
- }
-
- return false;
- }
-
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
- if(semanticHint != null) {
- return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- }
-
- // SemanticHint may be null when the element is created indirectly by
- // DND from model explorer
- // ex: Drag and drop a Connector may require to show ConnectorEnd first.
- EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
-
- // Get the type of the container
- String containerGraphicalType = containerView.getType();
-
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Class TopNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CLASS.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Class ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Class ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ComponentdefDiagramElementTypes.CLASS.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint().equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Port ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.COMMENT.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.COMMENT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CONSTRAINT.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CONSTRAINT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.CONSTRAINT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ComponentdefDiagramElementTypes.CLASS_CN_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalType)) { // Property ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(ComponentdefDiagramElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return super.createNode(semanticAdapter, containerView, ComponentdefDiagramElementTypes.PACKAGE.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
-
- Activator.log.error(new Exception("Could not create Node."));
- return null;
- }
-
- @Override
- protected void stampShortcut(View containerView, Node target) {
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", ComponentdefDiagramEditPart.DIAGRAM_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/UMLValidationDecoratorProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/UMLValidationDecoratorProvider.java
deleted file mode 100644
index 40998e31aa6..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/provider/UMLValidationDecoratorProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.gef.EditDomain;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.editparts.AbstractConnectionEditPart;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.CreateDecoratorsOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoratorTarget;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.componentdef.part.ComponentdefDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.providers.ValidationDecoratorProvider;
-import org.eclipse.papyrus.uml.diagram.composite.part.UMLVisualIDRegistry;
-
-/**
- * @generated
- */
-public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider implements IDecoratorProvider {
-
- /**
- * @generated
- */
- @Override
- public void createDecorators(IDecoratorTarget decoratorTarget) {
- EditPart editPart = (EditPart)decoratorTarget.getAdapter(EditPart.class);
- if(editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
- Object model = editPart.getModel();
- if((model instanceof View)) {
- View view = (View)model;
- if(!(view instanceof Edge) && !view.isSetElement()) {
- return;
- }
- }
- EditDomain ed = editPart.getViewer().getEditDomain();
- if(!(ed instanceof DiagramEditDomain)) {
- return;
- }
- if(((DiagramEditDomain)ed).getEditorPart() instanceof ComponentdefDiagramEditor) {
- decoratorTarget.installDecorator(KEY, new StatusDecorator(decoratorTarget));
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- public boolean provides(IOperation operation) {
- if(!(operation instanceof CreateDecoratorsOperation)) {
- return false;
- }
- IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation)operation).getDecoratorTarget();
- View view = (View)decoratorTarget.getAdapter(View.class);
- return view != null && ComponentdefDiagramEditPart.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(view));
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/CustomComponentdefDiagramDragDropEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/CustomComponentdefDiagramDragDropEditPolicy.java
deleted file mode 100644
index 91bb70950dd..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/CustomComponentdefDiagramDragDropEditPolicy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy.ComponentdefDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.componentdef.provider.ComponentdefDiagramElementTypes;
-
-
-/**
- * @author SD226317
- *
- */
-public class CustomComponentdefDiagramDragDropEditPolicy extends ComponentdefDiagramDragDropEditPolicy {
-
- @Override
- protected String getNodeGraphicalHint(View containerView, EObject domainElement) {
- String UNDEFINED = "-1"; //$NON-NLS-1$
-
- String containerGraphicalHint = containerView.getType();
- if(containerGraphicalHint == null) {
- // Cannot guess domain element graphical hint.
- return UNDEFINED;
- }
-
- // Fill the semantic hint during the drop
- // Elements inherited from CompositeDiagram
- // Dropping Class
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CLASS.getSemanticHint();
- }
-
- } else
- // Dropping Port
- if(domainElement instanceof org.eclipse.uml2.uml.Port) {
- if(ComponentdefDiagramElementTypes.CLASS.getSemanticHint().equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint().equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PORT_CN.getSemanticHint();
- }
-
- } else
- // Dropping Comment
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.COMMENT.getSemanticHint();
- }
-
- } else
- // Dropping Constraint
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ComponentdefDiagramEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.CONSTRAINT.getSemanticHint();
- }
-
- } else
- // Dropping Property
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
- if(ComponentdefDiagramElementTypes.CLASS_COMPARTMENT_CLASS_COMPOSITE_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
- if(ComponentdefDiagramElementTypes.PROPERTY_CN_COMPARTMENT_PROPERTY_PART_HINT.equals(containerGraphicalHint)) {
- return ComponentdefDiagramElementTypes.PROPERTY_CN.getSemanticHint();
- }
-
- }
-
- return UNDEFINED;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/StereotypeNodeLabelDisplayEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/StereotypeNodeLabelDisplayEditPolicy.java
deleted file mode 100644
index 649dbeb1e34..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/edit/policy/StereotypeNodeLabelDisplayEditPolicy.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the CeCILL-C Free Software License v1.0
- * which accompanies this distribution, and is available at
- * http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
- *
- * Contributors:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.edit.policy;
-
-//import org.eclipse.papyrus.uml.diagram.common.Activator;
-//import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
-//import org.eclipse.swt.graphics.Image;
-//import org.eclipse.uml2.uml.Element;
-//import org.eclipse.uml2.uml.Stereotype;
-
-//public class StereotypeNodeLabelDisplayEditPolicy extends AppliedStereotypeNodeLabelDisplayEditPolicy {
-//
-// // Always show the stereotype as icon
-// @Override
-// public Image stereotypeIconToDisplay() {
-//
-// // retrieve the first stereotype in the list of displayed stereotype
-// if(getUMLElement() instanceof Element) {
-// if(getUMLElement().getAppliedStereotypes().size()>0){
-// Stereotype stereotypesToDisplay = getUMLElement().getAppliedStereotypes().get(0);
-// return Activator.getIconElement(getUMLElement(), stereotypesToDisplay, false);
-//
-// }
-// }
-// return null;
-// }
-
-
-//}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/provider/CustomComponentDefDiagramEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/provider/CustomComponentDefDiagramEditPolicyProvider.java
deleted file mode 100644
index d1e3e794230..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src/org/eclipse/papyrus/robotml/diagram/componentdef/provider/CustomComponentDefDiagramEditPolicyProvider.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.componentdef.provider;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.notation.LayoutConstraint;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies.HyperLinkPopupBarEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.hyperlink.editpolicies.NavigationEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.CustomPropertyLabelEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.PortNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.common.editpolicies.StereotypeNodeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies.EncapsulatedClassifierResizableShapeEditPolicy;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortNameEditPart;
-import org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartNameEditPartCN;
-
-
-
-public class CustomComponentDefDiagramEditPolicyProvider extends ComponentdefDiagramEditPolicyProvider {
-
- @Override
- public void createEditPolicies(EditPart editPart) {
- super.createEditPolicies(editPart);
-
- editPart.installEditPolicy(NavigationEditPolicy.NAVIGATION_POLICY, new NavigationEditPolicy());
- if(!(editPart instanceof ConnectionEditPart)) {
- editPart.installEditPolicy(EditPolicyRoles.POPUPBAR_ROLE, new HyperLinkPopupBarEditPolicy());
- }
-
- editPart.installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new StereotypeNodeLabelDisplayEditPolicy());
- editPart.installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy());
-
- if(editPart instanceof PortNameEditPart || editPart instanceof PropertyPartNameEditPartCN) {
- editPart.installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new CustomPropertyLabelEditPolicy());
- } else if(editPart instanceof PortEditPart) {
- NotificationListener editPolicy = new PortNodeLabelDisplayEditPolicy();
- editPart.installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, (EditPolicy)editPolicy);
- Object model = editPart.getModel();
- LayoutConstraint notifier = ((Shape)model).getLayoutConstraint();
- if(model instanceof Shape) {
- //to force the refresh the port icon when the diagram is opening
- Notification notification = new ENotificationImpl((InternalEObject)notifier, Notification.SET, NotationPackage.eINSTANCE.getLocation_X(), 0, 0);
- editPolicy.notifyChanged(notification);
- }
- }
-
- }
-
- @Override
- public boolean provides(IOperation operation) {
- // TODO Auto-generated method stub
-
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!ComponentdefDiagramEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PortNameEditPart) {
- return true;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.composite.edit.parts.PropertyPartNameEditPartCN) {
- return true;
- }
- return super.provides(operation);
-
- }
-
-
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.MF
deleted file mode 100644
index 186934f4960..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.emf.common.ui;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.robotml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0"
-Export-Package: org.eclipse.papyrus.robotml.diagram.datatypedef.provid
- er
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.datatypedef.Acti
- vator
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.datatypedef;s
- ingleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.gen.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.gen.MF
deleted file mode 100644
index e4e2651a49b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/META-INF/MANIFEST.gen.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.datatypedef;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.datatypedef.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.diagram.common,
- org.eclipse.papyrus.core.adaptor.gmf,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.diagram.clazz,
- org.eclipse.papyrus.preferences
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.gen.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.gen.properties
deleted file mode 100644
index ca6d14e16f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.gen.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.properties
deleted file mode 100644
index 9fe825bebfb..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src-gen/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- palettes/,\
- model/,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/Diagram_DomainModel.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/Diagram_DomainModel.gif
deleted file mode 100644
index 6d18ce49bd3..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/Diagram_DomainModel.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeDiagram.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeDiagram.gif
deleted file mode 100644
index 0bbbb57754f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/icons/obj16/datatypeDiagram.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/model/Proteus.datatypedef.idgen b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/model/Proteus.datatypedef.idgen
deleted file mode 100644
index ad7641867b8..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/model/Proteus.datatypedef.idgen
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<diagramcontent:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagramcontent="http://www.eclipse.org/papyrus/0.7.0/diagramcontent" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" name="DatatypeDef" label="Datatype Definition Diagram" icon="icons/obj16/datatypeD.gif" hint="DatatypeDef" javaPackagePrefix="org.eclipse.papyrus.robotml.diagram.datatypedef" javaClassPrefix="DatatypeDef" language="proteus" createCommandLabel="Create a new Proteus Datatype Definition Diagram">
- <diagramEditPart name="DatattypeDefEditPart">
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.clazz.custom.policies.RemoveOrphanViewPolicy" key="&quot;RemoveOrphanView&quot;"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.robotml.diagram.datatypedef.edit.policy.DatatypeDefDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
- </diagramEditPart>
- <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy" paletteToolPrefix="clazz.tool">
- <genInheritedEditor href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/>
- <genNodes>
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
- </genNodes>
- <genNodes generatePreferencePage="false" generateTool="false">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.8"/>
- </genNodes>
- <genNodes>
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.13"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.12"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.11"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.5"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.19"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.26"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.17"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.25"/>
- </genNodes>
- <genNodes name="" customPreferencePage="">
- <genNode xsi:type="gmfgen:GenChildLabelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.18"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.14"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.29"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.30"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.15"/>
- </genNodes>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.10"/>
- </genLinks>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.13"/>
- </genLinks>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.17"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.14"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.12"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.2"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.4"/>
- </genLinks>
- </inheritedDiagrams>
-</diagramcontent:Diagram>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.gen.xml
deleted file mode 100644
index 4fc87ca6df7..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/palettes/datatypedef.palette.gen.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.PROTEUS_DatatypeDef__Tools" name="Tools">
- <aspectTool description="Create a new Package" id="datatypedef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="datatypedef.tool.comment"
- name="Comment" refToolId="clazz.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="datatypedef.tool.constraint"
- name="Constraint" refToolId="clazz.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new DataType" id="datatypedef.tool.datatype"
- name="DataType" refToolId="clazz.tool.datatype">
- </aspectTool>
- <aspectTool description="Create a new PrimitiveType" id="datatypedef.tool.primitivetype"
- name="PrimitiveType" refToolId="clazz.tool.primitivetype">
- </aspectTool>
- <aspectTool description="Create a new Signal" id="datatypedef.tool.signal"
- name="Signal" refToolId="clazz.tool.signal">
- </aspectTool>
- <aspectTool description="Create a new Package" id="datatypedef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new DataType" id="datatypedef.tool.datatype"
- name="DataType" refToolId="clazz.tool.datatype">
- </aspectTool>
- <aspectTool description="Create a new Enumeration" id="datatypedef.tool.enumeration"
- name="Enumeration" refToolId="clazz.tool.enumeration">
- </aspectTool>
- <aspectTool description="Create a new PrimitiveType" id="datatypedef.tool.primitivetype"
- name="PrimitiveType" refToolId="clazz.tool.primitivetype">
- </aspectTool>
- <aspectTool description="Create a new EnumerationLiteral" id="datatypedef.tool.enumerationliteral"
- name="EnumerationLiteral" refToolId="clazz.tool.enumerationliteral">
- </aspectTool>
- <aspectTool description="Create a new Signal" id="datatypedef.tool.signal"
- name="Signal" refToolId="clazz.tool.signal">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="datatypedef.tool.comment"
- name="Comment" refToolId="clazz.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="datatypedef.tool.constraint"
- name="Constraint" refToolId="clazz.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Diagram" id="datatypedef.tool.diagram"
- name="Diagram" refToolId=>
- </aspectTool>
- <aspectTool description="Create a new Enumeration literal" id="datatypedef.tool.enumeration literal"
- name="Enumeration literal" refToolId="clazz.tool.enumerationliteral">
- </aspectTool>
- <aspectTool description="Create a new Property" id="datatypedef.tool.property"
- name="Property" refToolId="clazz.tool.property">
- </aspectTool>
- <aspectTool description="Create a new Operation" id="datatypedef.tool.operation"
- name="Operation" refToolId="clazz.tool.operation">
- </aspectTool>
- <aspectTool description="Create a new Dependency" id="datatypedef.tool.dependency"
- name="Dependency" refToolId="clazz.tool.dependency">
- </aspectTool>
- <aspectTool description="Create a new PackageImport" id="datatypedef.tool.packageimport"
- name="PackageImport" refToolId="clazz.tool.packageimport">
- </aspectTool>
- <aspectTool description="Create a new CommentAnnotatedElement" id="datatypedef.tool.commentannotatedelement"
- name="CommentAnnotatedElement" refToolId="clazz.tool.link">
- </aspectTool>
- <aspectTool description="Create a new ConstraintConstrainedElement" id="datatypedef.tool.constraintconstrainedelement"
- name="ConstraintConstrainedElement" refToolId="clazz.tool.link">
- </aspectTool>
- <aspectTool description="Create a new PackageMerge" id="datatypedef.tool.packagemerge"
- name="PackageMerge" refToolId="clazz.tool.packagemerge">
- </aspectTool>
- <aspectTool description="Create a new ElementImport" id="datatypedef.tool.elementimport"
- name="ElementImport" refToolId="clazz.tool.elementimport">
- </aspectTool>
- <aspectTool description="Create a new Association" id="datatypedef.tool.association"
- name="Association" refToolId="clazz.tool.association">
- </aspectTool>
- <aspectTool description="Create a new Generalization" id="datatypedef.tool.generalization"
- name="Generalization" refToolId="clazz.tool.generalization">
- </aspectTool>
- </drawer>
- </content>
-</paletteDefinition>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.gen.xml
deleted file mode 100644
index 3000df0515b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.gen.xml
+++ /dev/null
@@ -1,700 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefCreateCommand"
- icon="icons/obj16/datatypeD.gif"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- language="proteus"
- label="Datatype Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefEditorFactory"
- icon="icons/obj16/datatypeD.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- name="Create a new Proteus Datatype Definition Diagram"
- description="Create a new Proteus Datatype Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif" label="Create a new Proteus Datatype Definition Diagram"
- style="push" tooltip="Create a new Proteus Datatype Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif" label="Create a new Proteus Datatype Definition Diagram"
- style="push" tooltip="Create a new Proteus Datatype Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif"
- label="Create a new Proteus Datatype Definition Diagram"
- style="push"
- tooltip="Create a new Proteus Datatype Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.diagram.common.paletteDefinition"
- name="PROTEUS_DatatypeDef">
-
- <paletteDefinition ID="PROTEUS_DatatypeDef"
- class="org.eclipse.papyrus.diagram.common.service.PluginPaletteProvider"
- name="PROTEUS_DatatypeDef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/datatypedef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.datatypedef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="DatatypeDef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.InheritedClassDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2007" = PACKAGE
- "2006" = ENUMERATION
- "2012" = COMMENT
- "2011" = CONSTRAINT
- "2010" = DATA_TYPE
- "2009" = PRIMITIVE_TYPE
- "2003" = SIGNAL
- "3009" = PACKAGE_CN
- "3027" = DATA_TYPE_CN
- "3025" = ENUMERATION_CN
- "3026" = PRIMITIVE_TYPE_CN
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3022" = SIGNAL_CN
- "3028" = COMMENT_CN
- "3029" = CONSTRAINT_CN
- "2016" = SHORT_CUT_DIAGRAM
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 2006, 2012, 2011, 2010, 2009, 2003, 3009, 3027, 3025, 3026, 3017, 3022, 3028, 3029, 2016"/>
-
- <!--
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3018" = DATA_TYPE_PROPERTY_CLN
- "3019" = DATA_TYPE_OPERATION_CLN
- "3005" = SIGNAL_PROPERTY_CLN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3017, 3018, 3019, 3005"/>
-
- <!--
- "4008" = DEPENDENCY
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "4009" = ELEMENT_IMPORT
- "4001" = ASSOCIATION
- "4002" = GENERALIZATION
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4014, 4011, 4009, 4001, 4002"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Enumeration" -->
- <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Enumeration"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.DataType" -->
- <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.DataType"/>
- </object>
-
- <!-- "uml.PrimitiveType" -->
- <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PrimitiveType"/>
- </object>
-
- <!-- "uml.Signal" -->
- <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Signal"/>
- </object>
-
- <!-- "uml.EnumerationLiteral" -->
- <object id="uml.EnumerationLiteral" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.EnumerationLiteral"/>
- </object>
-
- <!-- "notation.Diagram" -->
- <object id="notation.Diagram" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="notation.Diagram"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Operation" -->
- <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Operation"/>
- </object>
-
- <!-- "uml.Dependency" -->
- <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Dependency"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.PackageMerge" -->
- <object id="uml.PackageMerge" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageMerge"/>
- </object>
-
- <!-- "uml.ElementImport" -->
- <object id="uml.ElementImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.ElementImport"/>
- </object>
-
- <!-- "uml.Association" -->
- <object id="uml.Association" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Association"/>
- </object>
-
- <!-- "uml.Generalization" -->
- <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Generalization"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Enumeration, uml.Comment, uml.Constraint, uml.DataType, uml.PrimitiveType, uml.Signal, uml.EnumerationLiteral, notation.Diagram, uml.Property, uml.Operation"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.Dependency, uml.PackageImport, uml.PackageMerge, uml.ElementImport, uml.Association, uml.Generalization"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="DatatypeDef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2006" = ENUMERATION
- "5023" = ENUMERATION_LABEL_NAME_HINT
- "7015" = ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "2010" = DATA_TYPE
- "5035" = DATA_TYPE_LABEL_NAME_HINT
- "7020" = DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT
- "7021" = DATA_TYPE_COMPARTMENT_OPERATION_HINT
- "2009" = PRIMITIVE_TYPE
- "5032" = PRIMITIVE_TYPE_LABEL_NAME_HINT
- "2003" = SIGNAL
- "5008" = SIGNAL_LABEL_NAME_HINT
- "7005" = SIGNAL_COMPARTMENT_ATTRIBUTE_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3027" = DATA_TYPE_CN
- "5061" = DATA_TYPE_CN_LABEL_NAME_HINT
- "7032" = DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT
- "7033" = DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT
- "3025" = ENUMERATION_CN
- "5055" = ENUMERATION_CN_LABEL_NAME_HINT
- "7031" = ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT
- "3026" = PRIMITIVE_TYPE_CN
- "5058" = PRIMITIVE_TYPE_CN_LABEL_NAME_HINT
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3022" = SIGNAL_CN
- "5046" = SIGNAL_CN_LABEL_NAME_HINT
- "7026" = SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT
- "3028" = COMMENT_CN
- "5063" = COMMENT_CN_LABEL_BODY2_HINT
- "3029" = CONSTRAINT_CN
- "5064" = CONSTRAINT_CN_LABEL_NAME2_HINT
- "5160" = CONSTRAINT_CN_LABEL_BODY_HINT
- "2016" = SHORT_CUT_DIAGRAM
- "0" = SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="ENUMERATION"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2006, 5023, 7015"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="DATA_TYPE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2010, 5035, 7020, 7021"/>
- </object>
- <object
- id="PRIMITIVE_TYPE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2009, 5032"/>
- </object>
- <object
- id="SIGNAL"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2003, 5008, 7005"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="DATA_TYPE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3027, 5061, 7032, 7033"/>
- </object>
- <object
- id="ENUMERATION_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3025, 5055, 7031"/>
- </object>
- <object
- id="PRIMITIVE_TYPE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3026, 5058"/>
- </object>
- <object
- id="ENUMERATION_ENUMERATION_LITERAL_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3017"/>
- </object>
- <object
- id="SIGNAL_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3022, 5046, 7026"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3028, 5063"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3029, 5064, 5160"/>
- </object>
- <object
- id="SHORT_CUT_DIAGRAM"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2016, 0"/>
- </object>
-
- <!--
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3018" = DATA_TYPE_PROPERTY_CLN
- "3019" = DATA_TYPE_OPERATION_CLN
- "3005" = SIGNAL_PROPERTY_CLN
- -->
- <object
- id="ENUMERATION_ENUMERATION_LITERAL_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3017"/>
- </object>
- <object
- id="DATA_TYPE_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3018"/>
- </object>
- <object
- id="DATA_TYPE_OPERATION_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3019"/>
- </object>
- <object
- id="SIGNAL_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3005"/>
- </object>
-
- <!--
- "4008" = DEPENDENCY
- "6026" = DEPENDENCY_LABEL_NAME_HINT
- "6027" = DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "6030" = PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT
- "4009" = ELEMENT_IMPORT
- "6020" = ELEMENT_IMPORT_LABEL_ALIAS_HINT
- "6021" = ELEMENT_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4001" = ASSOCIATION
- "6001" = ASSOCIATION_LABEL_APPLIED_STEREOTYPE_HINT
- "6002" = ASSOCIATION_LABEL_NAME2_HINT
- "6003" = ASSOCIATION_LABEL_NAME3_HINT
- "6005" = ASSOCIATION_LABEL_NAME5_HINT
- "6033" = ASSOCIATION_LABEL_MULTIPLICTY_SOURCE_HINT
- "6034" = ASSOCIATION_LABEL_MULTIPLICTY_TARGET_HINT
- "4002" = GENERALIZATION
- "6007" = GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT
- -->
- <object
- id="DEPENDENCY"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4008, 6026, 6027"/>
- </object>
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
- <object
- id="PACKAGE_MERGE"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4011, 6030"/>
- </object>
- <object
- id="ELEMENT_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4009, 6020, 6021"/>
- </object>
- <object
- id="ASSOCIATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4001, 6001, 6002, 6003, 6005, 6033, 6034"/>
- </object>
- <object
- id="GENERALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002, 6007"/>
- </object>
-
- <context views="PACKAGE, ENUMERATION, COMMENT, CONSTRAINT, DATA_TYPE, PRIMITIVE_TYPE, SIGNAL, PACKAGE_CN, DATA_TYPE_CN, ENUMERATION_CN, PRIMITIVE_TYPE_CN, ENUMERATION_ENUMERATION_LITERAL_CLN, SIGNAL_CN, COMMENT_CN, CONSTRAINT_CN, DIAGRAM"/>
- <context views="ENUMERATION_ENUMERATION_LITERAL_CLN, DATA_TYPE_PROPERTY_CLN, DATA_TYPE_OPERATION_CLN, SIGNAL_PROPERTY_CLN"/>
- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT, PACKAGE_MERGE, ELEMENT_IMPORT, ASSOCIATION, GENERALIZATION"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- name="DatatypeDef Diagram"
- category="org.eclipse.papyrus.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DatatypeDefGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- name="DataType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- name="PrimitiveType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- name="Signal">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- name="DataType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage"
- name="Enumeration">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- name="PrimitiveType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationLiteralPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationLiteralPreferencePage"
- name="EnumerationLiteral">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- name="Signal">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DiagramPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DiagramPreferencePage"
- name="Diagram">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DependencyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DependencyPreferencePage"
- name="Dependency">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageMergePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageMergePreferencePage"
- name="PackageMerge">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ElementImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ElementImportPreferencePage"
- name="ElementImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.AssociationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.AssociationPreferencePage"
- name="Association">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.GeneralizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.GeneralizationPreferencePage"
- name="Generalization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.OperationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.OperationPreferencePage"
- name="Operation">
- </page>
-
-</extension>
-
-</plugin> \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.properties
deleted file mode 100644
index 9fe9194a1cd..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#################################################################################
-# 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
-#
-##################################################################################
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = RobotML profile and libraries (Incubation)
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.xml
deleted file mode 100644
index 398fe3633c8..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/plugin.xml
+++ /dev/null
@@ -1,702 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefCreateCommand"
- icon="icons/obj16/datatypeD.gif"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- language="robotML"
- label="Datatype Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefEditorFactory"
- icon="icons/obj16/datatypeD.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- name="Create a new RobotML Datatype Definition Diagram"
- description="Create a new RobotML Datatype Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.DatatypeDefCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif" label="Create a new RobotML Datatype Definition Diagram"
- style="push" tooltip="Create a new RobotML Datatype Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
-
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.robotml.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif" label="Create a new RobotML Datatype Definition Diagram"
- style="push" tooltip="Create a new RobotML Datatype Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.datatypedef.CreateCommand"
- icon="icons/obj16/datatypeD.gif"
- label="Create a new RobotML Datatype Definition Diagram"
- style="push"
- tooltip="Create a new RobotML Datatype Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="RobotML_DatatypeDef">
-
- <paletteDefinition ID="RobotML_DatatypeDef"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="RobotML_DatatypeDef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/datatypedef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.datatypedef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefViewProvider">
- <Priority name="High"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="DatatypeDef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.InheritedClassDiagramViewProvider">
- <Priority name="High"/>
-
- <!--
- "2007" = PACKAGE
- "2006" = ENUMERATION
- "2012" = COMMENT
- "2011" = CONSTRAINT
- "2010" = DATA_TYPE
- "2009" = PRIMITIVE_TYPE
- "2003" = SIGNAL
- "3009" = PACKAGE_CN
- "3027" = DATA_TYPE_CN
- "3025" = ENUMERATION_CN
- "3026" = PRIMITIVE_TYPE_CN
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3022" = SIGNAL_CN
- "3028" = COMMENT_CN
- "3029" = CONSTRAINT_CN
- "2016" = SHORT_CUT_DIAGRAM
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 2006, 2012, 2011, 2010, 2009, 2003, 3009, 3027, 3025, 3026, 3017, 3022, 3028, 3029, 2016"/>
-
- <!--
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3018" = DATA_TYPE_PROPERTY_CLN
- "3019" = DATA_TYPE_OPERATION_CLN
- "3005" = SIGNAL_PROPERTY_CLN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3017, 3018, 3019, 3005"/>
-
- <!--
- "4008" = DEPENDENCY
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "4009" = ELEMENT_IMPORT
- "4001" = ASSOCIATION
- "4002" = GENERALIZATION
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4014, 4011, 4009, 4001, 4002"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Enumeration" -->
- <object id="uml.Enumeration" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Enumeration"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.DataType" -->
- <object id="uml.DataType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.DataType"/>
- </object>
-
- <!-- "uml.PrimitiveType" -->
- <object id="uml.PrimitiveType" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PrimitiveType"/>
- </object>
-
- <!-- "uml.Signal" -->
- <object id="uml.Signal" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Signal"/>
- </object>
-
- <!-- "uml.EnumerationLiteral" -->
- <object id="uml.EnumerationLiteral" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.EnumerationLiteral"/>
- </object>
-
- <!-- "notation.Diagram" -->
- <object id="notation.Diagram" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="notation.Diagram"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Operation" -->
- <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Operation"/>
- </object>
-
- <!-- "uml.Dependency" -->
- <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Dependency"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.PackageMerge" -->
- <object id="uml.PackageMerge" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageMerge"/>
- </object>
-
- <!-- "uml.ElementImport" -->
- <object id="uml.ElementImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.ElementImport"/>
- </object>
-
- <!-- "uml.Association" -->
- <object id="uml.Association" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Association"/>
- </object>
-
- <!-- "uml.Generalization" -->
- <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Generalization"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Enumeration, uml.Comment, uml.Constraint, uml.DataType, uml.PrimitiveType, uml.Signal, uml.EnumerationLiteral, notation.Diagram, uml.Property, uml.Operation"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.Dependency, uml.PackageImport, uml.PackageMerge, uml.ElementImport, uml.Association, uml.Generalization"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="DatatypeDef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2006" = ENUMERATION
- "5023" = ENUMERATION_LABEL_NAME_HINT
- "7015" = ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "2010" = DATA_TYPE
- "5035" = DATA_TYPE_LABEL_NAME_HINT
- "7020" = DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT
- "7021" = DATA_TYPE_COMPARTMENT_OPERATION_HINT
- "2009" = PRIMITIVE_TYPE
- "5032" = PRIMITIVE_TYPE_LABEL_NAME_HINT
- "2003" = SIGNAL
- "5008" = SIGNAL_LABEL_NAME_HINT
- "7005" = SIGNAL_COMPARTMENT_ATTRIBUTE_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3027" = DATA_TYPE_CN
- "5061" = DATA_TYPE_CN_LABEL_NAME_HINT
- "7032" = DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT
- "7033" = DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT
- "3025" = ENUMERATION_CN
- "5055" = ENUMERATION_CN_LABEL_NAME_HINT
- "7031" = ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT
- "3026" = PRIMITIVE_TYPE_CN
- "5058" = PRIMITIVE_TYPE_CN_LABEL_NAME_HINT
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3022" = SIGNAL_CN
- "5046" = SIGNAL_CN_LABEL_NAME_HINT
- "7026" = SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT
- "3028" = COMMENT_CN
- "5063" = COMMENT_CN_LABEL_BODY2_HINT
- "3029" = CONSTRAINT_CN
- "5064" = CONSTRAINT_CN_LABEL_NAME2_HINT
- "5160" = CONSTRAINT_CN_LABEL_BODY_HINT
- "2016" = SHORT_CUT_DIAGRAM
- "0" = SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="ENUMERATION"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2006, 5023, 7015"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="DATA_TYPE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2010, 5035, 7020, 7021"/>
- </object>
- <object
- id="PRIMITIVE_TYPE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2009, 5032"/>
- </object>
- <object
- id="SIGNAL"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2003, 5008, 7005"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="DATA_TYPE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3027, 5061, 7032, 7033"/>
- </object>
- <object
- id="ENUMERATION_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3025, 5055, 7031"/>
- </object>
- <object
- id="PRIMITIVE_TYPE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3026, 5058"/>
- </object>
- <object
- id="ENUMERATION_ENUMERATION_LITERAL_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3017"/>
- </object>
- <object
- id="SIGNAL_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3022, 5046, 7026"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3028, 5063"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3029, 5064, 5160"/>
- </object>
- <object
- id="SHORT_CUT_DIAGRAM"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2016, 0"/>
- </object>
-
- <!--
- "3017" = ENUMERATION_ENUMERATION_LITERAL_CLN
- "3018" = DATA_TYPE_PROPERTY_CLN
- "3019" = DATA_TYPE_OPERATION_CLN
- "3005" = SIGNAL_PROPERTY_CLN
- -->
- <object
- id="ENUMERATION_ENUMERATION_LITERAL_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3017"/>
- </object>
- <object
- id="DATA_TYPE_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3018"/>
- </object>
- <object
- id="DATA_TYPE_OPERATION_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3019"/>
- </object>
- <object
- id="SIGNAL_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3005"/>
- </object>
-
- <!--
- "4008" = DEPENDENCY
- "6026" = DEPENDENCY_LABEL_NAME_HINT
- "6027" = DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "6030" = PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT
- "4009" = ELEMENT_IMPORT
- "6020" = ELEMENT_IMPORT_LABEL_ALIAS_HINT
- "6021" = ELEMENT_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4001" = ASSOCIATION
- "6001" = ASSOCIATION_LABEL_APPLIED_STEREOTYPE_HINT
- "6002" = ASSOCIATION_LABEL_NAME2_HINT
- "6003" = ASSOCIATION_LABEL_NAME3_HINT
- "6005" = ASSOCIATION_LABEL_NAME5_HINT
- "6033" = ASSOCIATION_LABEL_MULTIPLICTY_SOURCE_HINT
- "6034" = ASSOCIATION_LABEL_MULTIPLICTY_TARGET_HINT
- "4002" = GENERALIZATION
- "6007" = GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT
- -->
- <object
- id="DEPENDENCY"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4008, 6026, 6027"/>
- </object>
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
- <object
- id="PACKAGE_MERGE"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4011, 6030"/>
- </object>
- <object
- id="ELEMENT_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4009, 6020, 6021"/>
- </object>
- <object
- id="ASSOCIATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4001, 6001, 6002, 6003, 6005, 6033, 6034"/>
- </object>
- <object
- id="GENERALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002, 6007"/>
- </object>
-
- <context views="PACKAGE, ENUMERATION, COMMENT, CONSTRAINT, DATA_TYPE, PRIMITIVE_TYPE, SIGNAL, PACKAGE_CN, DATA_TYPE_CN, ENUMERATION_CN, PRIMITIVE_TYPE_CN, ENUMERATION_ENUMERATION_LITERAL_CLN, SIGNAL_CN, COMMENT_CN, CONSTRAINT_CN, SHORT_CUT_DIAGRAM"/>
- <context views="ENUMERATION_ENUMERATION_LITERAL_CLN, DATA_TYPE_PROPERTY_CLN, DATA_TYPE_OPERATION_CLN, SIGNAL_PROPERTY_CLN"/>
- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT, PACKAGE_MERGE, ELEMENT_IMPORT, ASSOCIATION, GENERALIZATION"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- name="DatatypeDef Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DatatypeDefGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- name="DataType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- name="PrimitiveType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- name="Signal">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage"
- name="DataType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage"
- name="Enumeration">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage"
- name="PrimitiveType">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationLiteralPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationLiteralPreferencePage"
- name="EnumerationLiteral">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage"
- name="Signal">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DiagramPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DiagramPreferencePage"
- name="Diagram">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DependencyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DependencyPreferencePage"
- name="Dependency">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageMergePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageMergePreferencePage"
- name="PackageMerge">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ElementImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ElementImportPreferencePage"
- name="ElementImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.AssociationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.AssociationPreferencePage"
- name="Association">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.GeneralizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.GeneralizationPreferencePage"
- name="Generalization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.OperationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.OperationPreferencePage"
- name="Operation">
- </page>
-
-</extension>
-
-</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/Activator.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/Activator.java
deleted file mode 100644
index 79219fffa02..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/Activator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DatatypeDefPreferenceInitializer;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.robotml.diagram.datatypedef";
-
- /** The plug-in shared instance */
- private static Activator plugin;
-
- /** The logging helper */
- public static LogHelper log;
-
- /** The plug-in Preference store */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
-
- /** Default constructor */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // register the login helper
- log = new LogHelper(plugin);
-
- // register the preference store
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
-
- // Preferences initialization
- DatatypeDefPreferenceInitializer diagramPreferenceInitializer = new DatatypeDefPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getInstance() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- *
- * @return Shared Preference Store.
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
- return store;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefCreateCommand.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefCreateCommand.java
deleted file mode 100644
index f412244be69..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefCreateCommand.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DatatypeDefCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- @Override
- protected String getDefaultDiagramName() {
- return "DataTypesDiagram";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return DatatypeDefEditPart.DIAGRAM_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefEditorFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefEditorFactory.java
deleted file mode 100644
index d0444671561..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefEditorFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DatatypeDefEditorFactory extends GmfEditorFactory {
-
- public DatatypeDefEditorFactory() {
- super(DatatypeDefForMultiEditor.class, DatatypeDefEditPart.DIAGRAM_ID);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefForMultiEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefForMultiEditor.java
deleted file mode 100644
index 963f3c3f8a3..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/DatatypeDefForMultiEditor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.part.DatatypeDefEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
- *
- */
-public class DatatypeDefForMultiEditor extends DatatypeDefEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/datatypeD.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(DatatypeDefForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- *
- */
- public DatatypeDefForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.robotml.diagram.datatypedef.EditingDomain";
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/part/DatatypeDefEditPart.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/part/DatatypeDefEditPart.java
deleted file mode 100644
index 41c43ecbc20..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/part/DatatypeDefEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.policy.DatatypeDefDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-
-public class DatatypeDefEditPart extends DiagramEditPart {
-
- public final static String DIAGRAM_ID = "DatatypeDef"; //$NON-NLS-1$
-
- public DatatypeDefEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DatatypeDefDragDropEditPolicy());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/policy/DatatypeDefDragDropEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/policy/DatatypeDefDragDropEditPolicy.java
deleted file mode 100644
index 5d29b6a0c18..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/edit/policy/DatatypeDefDragDropEditPolicy.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.provider.DatatypeDefElementTypes;
-
-/** Customization of the DND edit policy for the DatatypeDef Diagram */
-public class DatatypeDefDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
-
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return new Integer(getNodeGraphicalHint(containerView, domainElement));
- }
-
- protected String getNodeGraphicalHint(View containerView, EObject domainElement) {
- String UNDEFINED = "-1";
-
- String containerGraphicalHint = containerView.getType();
- if(containerGraphicalHint == null) {
- // Cannot guess domain element graphical hint.
- return UNDEFINED;
- }
-
- // Fill the semantic hint during the drop
- // Elements inherited from ClassDiagram
- // Dropping Package
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PACKAGE.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PACKAGE_CN.getSemanticHint();
- }
-
- } else
- // Dropping Enumeration
- if(domainElement instanceof org.eclipse.uml2.uml.Enumeration) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_CN.getSemanticHint();
- }
-
- } else
- // Dropping Comment
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.COMMENT.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.COMMENT_CN.getSemanticHint();
- }
-
- } else
- // Dropping Constraint
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.CONSTRAINT.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
-
- } else
- // Dropping DataType
-
- // Dropping PrimitiveType
- if(domainElement instanceof org.eclipse.uml2.uml.PrimitiveType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PRIMITIVE_TYPE.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PRIMITIVE_TYPE_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.PRIMITIVE_TYPE_CN.getSemanticHint();
- }
-
- } else if(domainElement instanceof org.eclipse.uml2.uml.DataType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_CN.getSemanticHint();
- }
-
- } else
- // Dropping Signal
- if(domainElement instanceof org.eclipse.uml2.uml.Signal) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SIGNAL.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SIGNAL_CN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SIGNAL_CN.getSemanticHint();
- }
-
- } else
- // Dropping EnumerationLiteral
- if(domainElement instanceof org.eclipse.uml2.uml.EnumerationLiteral) {
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint();
- }
-
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint();
- }
- } else
- // Dropping Diagram
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SHORT_CUT_DIAGRAM.getSemanticHint();
- }
-
- } else
- // Dropping Property
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(DatatypeDefElementTypes.SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SIGNAL_PROPERTY_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.SIGNAL_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.SIGNAL_PROPERTY_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_PROPERTY_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_PROPERTY_CLN.getSemanticHint();
- }
- } else
- // Dropping Operation
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_OPERATION_CLN.getSemanticHint();
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalHint)) {
- return DatatypeDefElementTypes.DATA_TYPE_OPERATION_CLN.getSemanticHint();
- }
- }
-
- return UNDEFINED;
- }
-
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- return new Integer(getLinkGraphicalHint(domainElement));
- }
-
- protected String getLinkGraphicalHint(EObject domainElement) {
- String UNDEFINED = "-1";
-
- if(domainElement instanceof org.eclipse.uml2.uml.Dependency) {
- return DatatypeDefElementTypes.DEPENDENCY.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PackageImport) {
- return DatatypeDefElementTypes.PACKAGE_IMPORT.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PackageMerge) {
- return DatatypeDefElementTypes.PACKAGE_MERGE.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.ElementImport) {
- return DatatypeDefElementTypes.ELEMENT_IMPORT.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Association) {
- return DatatypeDefElementTypes.ASSOCIATION.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Generalization) {
- return DatatypeDefElementTypes.GENERALIZATION.getSemanticHint();
- }
-
- return UNDEFINED;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/factory/DatatypeDefViewFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/factory/DatatypeDefViewFactory.java
deleted file mode 100644
index 1e8b37158cd..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/factory/DatatypeDefViewFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.factory;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-
-public class DatatypeDefViewFactory extends DiagramViewFactory {
-
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/part/DatatypeDefEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/part/DatatypeDefEditor.java
deleted file mode 100644
index e794b2294cb..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/part/DatatypeDefEditor.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.part;
-
-import java.util.EventObject;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class DatatypeDefEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.robotml.diagram.datatypedef.part.DatatypeDefEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public DatatypeDefEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
- }
-
- /**
- * @generated
- */
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- public String getContributorId() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @generated
- */
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
-
- // Replace diagram contextual menu removing default
- // delete from model action.
- DiagramContextMenuProvider provider = (DiagramContextMenuProvider)getDiagramGraphicalViewer().getContextMenu();
- Set<String> menuExclusions = provider.getExclusionSet();
- menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
- provider.setExclusionSet(menuExclusions);
- }
-
- /**
- * @generated
- */
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- savedOperation = getOperationHistory().getUndoOperation(getUndoContext());
- }
-
- /**
- * @generated
- */
- public boolean isDirty() {
- IUndoableOperation op = getOperationHistory().getUndoOperation(getUndoContext());
- return savedOperation != op;
- }
-
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/AssociationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/AssociationPreferencePage.java
deleted file mode 100644
index 3b64bcfe105..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/AssociationPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class AssociationPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Association";
-
- public AssociationPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Association"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentAnnotatedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentAnnotatedElementPreferencePage.java
deleted file mode 100644
index 9faf93cc5ef..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentAnnotatedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class CommentAnnotatedElementPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_CommentAnnotatedElement";
-
- public CommentAnnotatedElementPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentPreferencePage.java
deleted file mode 100644
index ddbf4c6882a..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class CommentPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Comment";
-
-
- public CommentPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintConstrainedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintConstrainedElementPreferencePage.java
deleted file mode 100644
index ed81d14051d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintConstrainedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class ConstraintConstrainedElementPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement";
-
- public ConstraintConstrainedElementPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index 2f1f1b30805..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class ConstraintPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Constraint";
-
-
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java
deleted file mode 100644
index c52d20a4966..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DataTypePreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_DataType";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "AttributeCompartment", "OperationCompartment" };
-
- public DataTypePreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_DataType"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefGeneralPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefGeneralPreferencePage.java
deleted file mode 100644
index 1809c2a50dd..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefGeneralPreferencePage.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-
-public class DatatypeDefGeneralPreferencePage extends DiagramPreferencePage {
-
- public DatatypeDefGeneralPreferencePage() {
- setPreferenceStore(Activator.getInstance().getPreferenceStore());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefLinkPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefLinkPreferencePage.java
deleted file mode 100644
index dd84a3c94ee..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefLinkPreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-
-public class DatatypeDefLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefNodePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefNodePreferencePage.java
deleted file mode 100644
index c1abbd83ba1..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefNodePreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-
-public class DatatypeDefNodePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefPreferenceInitializer.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefPreferenceInitializer.java
deleted file mode 100644
index f1bbf2964ca..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DatatypeDefPreferenceInitializer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-
-public class DatatypeDefPreferenceInitializer extends AbstractPreferenceInitializer {
-
- protected IPreferenceStore getPreferenceStore() {
- return Activator.getInstance().getPreferenceStore();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DataTypePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PrimitiveTypePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.EnumerationLiteralPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.SignalPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DiagramPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.DependencyPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageImportPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.CommentAnnotatedElementPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ConstraintConstrainedElementPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.PackageMergePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.ElementImportPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.AssociationPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.datatypedef.preferences.GeneralizationPreferencePage.initDefaults(store);
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DependencyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DependencyPreferencePage.java
deleted file mode 100644
index 22fa3265fff..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DependencyPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DependencyPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Dependency";
-
- public DependencyPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Dependency"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java
deleted file mode 100644
index 9f2781b2caf..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DiagramPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Diagram";
-
-
- public DiagramPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Diagram"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ElementImportPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ElementImportPreferencePage.java
deleted file mode 100644
index e003471c744..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/ElementImportPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class ElementImportPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_ElementImport";
-
- public ElementImportPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_ElementImport"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationLiteralPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationLiteralPreferencePage.java
deleted file mode 100644
index 3da0bc8b0e7..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationLiteralPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class EnumerationLiteralPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_EnumerationLiteral";
-
-
- public EnumerationLiteralPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_EnumerationLiteral"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java
deleted file mode 100644
index e1bd4d08e50..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class EnumerationPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Enumeration";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "EnumerationLiteralCompartment" };
-
- public EnumerationPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Enumeration"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/GeneralizationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/GeneralizationPreferencePage.java
deleted file mode 100644
index 31757413f6f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/GeneralizationPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class GeneralizationPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Generalization";
-
- public GeneralizationPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Generalization"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/OperationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/OperationPreferencePage.java
deleted file mode 100644
index 9c0415bb925..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/OperationPreferencePage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class OperationPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Operation";
-
- public OperationPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Operation"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageImportPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageImportPreferencePage.java
deleted file mode 100644
index 7a3c2612a6e..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageImportPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class PackageImportPreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_PackageImport";
-
- public PackageImportPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_PackageImport"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageMergePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageMergePreferencePage.java
deleted file mode 100644
index 3ff3d67261c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackageMergePreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class PackageMergePreferencePage extends DatatypeDefLinkPreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_PackageMerge";
-
- public PackageMergePreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_PackageMerge"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java
deleted file mode 100644
index 8fd621a0b79..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class PackagePreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Package";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "PackageableElementCompartment" };
-
- public PackagePreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java
deleted file mode 100644
index 144dbf82999..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class PrimitiveTypePreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_PrimitiveType";
-
-
- public PrimitiveTypePreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_PrimitiveType"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 50);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PropertyPreferencePage.java
deleted file mode 100644
index 4172ec28545..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PropertyPreferencePage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class PropertyPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Property";
-
- public PropertyPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Property"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java
deleted file mode 100644
index 7a3dc0e8a94..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class SignalPreferencePage extends DatatypeDefNodePreferencePage {
-
- public static String prefKey = DatatypeDefEditPart.DIAGRAM_ID + "_Signal";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "AttributeCompartment" };
-
- public SignalPreferencePage() {
- super();
- setPreferenceKey(DatatypeDefEditPart.DIAGRAM_ID + "_Signal"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPartProvider.java
deleted file mode 100644
index f4b2b5f15f6..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPartProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class DatatypeDefEditPartProvider extends AbstractEditPartProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is DatatypeDef Diagram
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(view.getType())) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramEditPartClass(View view) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(view.getType())) {
- return DatatypeDefEditPart.class;
- }
-
- Activator.log.error(new Exception("Could not create EditPart."));
- return null;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPolicyProvider.java
deleted file mode 100644
index 7e551f40743..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefEditPolicyProvider.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.policy.DatatypeDefDragDropEditPolicy;
-
-public class DatatypeDefEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- public boolean provides(IOperation operation) {
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeOperationCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DataTypeOperationCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationLiteralEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ShortCutDiagramEditPart) {
- return true;
- }
-
- return false;
- }
-
- public void createEditPolicies(EditPart editPart) {
- editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DatatypeDefDragDropEditPolicy());
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefElementTypes.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefElementTypes.java
deleted file mode 100644
index d4c91094e89..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefElementTypes.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-public class DatatypeDefElementTypes extends AbstractElementTypeEnumerator {
-
- /** ********************************************************* */
- /** Datatype Definition Diagram specific elements **************** */
- /** ********************************************************* */
-
- /** Datatype Definition Diagram :: Diagram */
- public static final IHintedType DATATYPE_DEF_DIAGRAM = (IHintedType)getElementType("DatatypeDef"); //$NON-NLS-1$
-
-
-
-
- /** ********************************************************* */
- /** Datatype Definition Diagram - ClassDiagram related elements */
- /** ********************************************************* */
-
-
- /** ClassDiagram :: PACKAGE */
- public static final IHintedType PACKAGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_2007"); //$NON-NLS-1$
-
- public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7016";
-
- public static final String PACKAGE_LABEL_NAME_HINT = "5026";
-
- /** ClassDiagram :: ENUMERATION */
- public static final IHintedType ENUMERATION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006"); //$NON-NLS-1$
-
- public static final String ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT = "7015";
-
- public static final String ENUMERATION_LABEL_NAME_HINT = "5023";
-
- /** ClassDiagram :: COMMENT */
- public static final IHintedType COMMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"); //$NON-NLS-1$
-
- public static final String COMMENT_LABEL_BODY_HINT = "5038";
-
- /** ClassDiagram :: CONSTRAINT */
- public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_NAME_HINT = "5037";
-
- public static final String CONSTRAINT_LABEL_BODY_HINT = "5159";
-
- /** ClassDiagram :: DATA_TYPE */
- public static final IHintedType DATA_TYPE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.DataType_2010"); //$NON-NLS-1$
-
- public static final String DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT = "7020";
-
- public static final String DATA_TYPE_COMPARTMENT_OPERATION_HINT = "7021";
-
- public static final String DATA_TYPE_LABEL_NAME_HINT = "5035";
-
- /** ClassDiagram :: PRIMITIVE_TYPE */
- public static final IHintedType PRIMITIVE_TYPE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_2009"); //$NON-NLS-1$
-
- public static final String PRIMITIVE_TYPE_LABEL_NAME_HINT = "5032";
-
- /** ClassDiagram :: SIGNAL */
- public static final IHintedType SIGNAL = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Signal_2003"); //$NON-NLS-1$
-
- public static final String SIGNAL_COMPARTMENT_ATTRIBUTE_HINT = "7005";
-
- public static final String SIGNAL_LABEL_NAME_HINT = "5008";
-
- /** ClassDiagram :: PACKAGE_CN */
- public static final IHintedType PACKAGE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_3009"); //$NON-NLS-1$
-
- public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7010";
-
- public static final String PACKAGE_CN_LABEL_NAME_HINT = "5017";
-
- /** ClassDiagram :: DATA_TYPE_CN */
- public static final IHintedType DATA_TYPE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.DataType_3027"); //$NON-NLS-1$
-
- public static final String DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT = "7032";
-
- public static final String DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT = "7033";
-
- public static final String DATA_TYPE_CN_LABEL_NAME_HINT = "5061";
-
- /** ClassDiagram :: ENUMERATION_CN */
- public static final IHintedType ENUMERATION_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"); //$NON-NLS-1$
-
- public static final String ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT = "7031";
-
- public static final String ENUMERATION_CN_LABEL_NAME_HINT = "5055";
-
- /** ClassDiagram :: PRIMITIVE_TYPE_CN */
- public static final IHintedType PRIMITIVE_TYPE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PrimitiveType_3026"); //$NON-NLS-1$
-
- public static final String PRIMITIVE_TYPE_CN_LABEL_NAME_HINT = "5058";
-
-
-
- /** ClassDiagram :: SIGNAL_CN */
- public static final IHintedType SIGNAL_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Signal_3022"); //$NON-NLS-1$
-
- public static final String SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT = "7026";
-
- public static final String SIGNAL_CN_LABEL_NAME_HINT = "5046";
-
- /** ClassDiagram :: COMMENT_CN */
- public static final IHintedType COMMENT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"); //$NON-NLS-1$
-
- public static final String COMMENT_CN_LABEL_BODY2_HINT = "5063";
-
- /** ClassDiagram :: CONSTRAINT_CN */
- public static final IHintedType CONSTRAINT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_CN_LABEL_NAME2_HINT = "5064";
-
- public static final String CONSTRAINT_CN_LABEL_BODY_HINT = "5160";
-
- /** ClassDiagram :: SHORT_CUT_DIAGRAM */
- public static final IHintedType SHORT_CUT_DIAGRAM = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016"); //$NON-NLS-1$
-
- public static final String SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT = "0";
-
-
- /** ClassDiagram :: DEPENDENCY */
- public static final IHintedType DEPENDENCY = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"); //$NON-NLS-1$
-
- public static final String DEPENDENCY_LABEL_NAME_HINT = "6026";
-
- public static final String DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT = "6027";
-
- /** ClassDiagram :: PACKAGE_IMPORT */
- public static final IHintedType PACKAGE_IMPORT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"); //$NON-NLS-1$
-
- public static final String PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT = "6022";
-
- /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */
- public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"); //$NON-NLS-1$
-
- /** ClassDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
- public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"); //$NON-NLS-1$
-
- /** ClassDiagram :: PACKAGE_MERGE */
- public static final IHintedType PACKAGE_MERGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011"); //$NON-NLS-1$
-
- public static final String PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT = "6030";
-
- /** ClassDiagram :: ELEMENT_IMPORT */
- public static final IHintedType ELEMENT_IMPORT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009"); //$NON-NLS-1$
-
- public static final String ELEMENT_IMPORT_LABEL_ALIAS_HINT = "6020";
-
- public static final String ELEMENT_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT = "6021";
-
- /** ClassDiagram :: ASSOCIATION */
- public static final IHintedType ASSOCIATION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Association_4001"); //$NON-NLS-1$
-
- public static final String ASSOCIATION_LABEL_APPLIED_STEREOTYPE_HINT = "6001";
-
- public static final String ASSOCIATION_LABEL_NAME2_HINT = "6002";
-
- public static final String ASSOCIATION_LABEL_NAME3_HINT = "6003";
-
- public static final String ASSOCIATION_LABEL_NAME5_HINT = "6005";
-
- public static final String ASSOCIATION_LABEL_MULTIPLICTY_SOURCE_HINT = "6033";
-
- public static final String ASSOCIATION_LABEL_MULTIPLICTY_TARGET_HINT = "6034";
-
- /** ClassDiagram :: GENERALIZATION */
- public static final IHintedType GENERALIZATION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002"); //$NON-NLS-1$
-
- public static final String GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT = "6007";
-
- /** ClassDiagram :: ChildLabelNodes */
- public static final IHintedType ENUMERATION_ENUMERATION_LITERAL_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.EnumerationLiteral_3017"); //$NON-NLS-1$
-
- public static final IHintedType DATA_TYPE_PROPERTY_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Property_3018"); //$NON-NLS-1$
-
- public static final IHintedType DATA_TYPE_OPERATION_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Operation_3019"); //$NON-NLS-1$
-
- public static final IHintedType SIGNAL_PROPERTY_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Property_3005"); //$NON-NLS-1$
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefViewProvider.java
deleted file mode 100644
index b479840b0a8..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/DatatypeDefViewProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.Activator;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.factory.DatatypeDefViewFactory;
-
-public class DatatypeDefViewProvider extends AbstractViewProvider {
-
- @Override
- protected boolean provides(CreateDiagramViewOperation operation) {
-
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(operation.getSemanticHint())) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(diagramKind)) {
- return DatatypeDefViewFactory.class;
- }
-
- Activator.log.error(new Exception("Could not create View."));
- return null;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramEditPartProvider.java
deleted file mode 100644
index c8cfc922e70..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramEditPartProvider.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLEditPartProvider;
-
-public class InheritedClassDiagramEditPartProvider extends UMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is a DatatypeDef Diagram
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(view.getDiagram().getType())) {
- return false;
- }
-
- // Test supported inherited types
- EObject eobject = view.getElement();
-
- /** Nodes (and ChildLabelNodes) *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Package) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Enumeration) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Comment) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Constraint) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.DataType) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.PrimitiveType) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Signal) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.EnumerationLiteral) {
- return true;
- }
- if(eobject instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Property) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Operation) {
- return true;
- }
-
- /** Edges *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Dependency) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.PackageImport) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.PackageMerge) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.ElementImport) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Association) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Generalization) {
- return true;
- }
-
- // Additional test needed here to decide whether to support Feature type links.
- // As feature type link are not related to a MetaClass from the domain model
- // they are not already handled by previous tests.
- String hint = view.getType();
-
- /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
- if(DatatypeDefElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
- if(DatatypeDefElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramViewProvider.java
deleted file mode 100644
index e275fe1a9b9..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/provider/InheritedClassDiagramViewProvider.java
+++ /dev/null
@@ -1,564 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.datatypedef.provider;
-
-import static org.eclipse.papyrus.infra.core.Activator.log;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
-import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
-
-public class InheritedClassDiagramViewProvider extends UMLViewProvider {
-
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- // No need to override here, assuming provides is correctly implemented.
- Edge createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
-
- if(createdEdge == null) {
- log.error(new Exception("Could not create Edge."));
- }
-
- return createdEdge;
- }
-
- protected boolean provides(CreateViewForKindOperation op) {
-
- // This provider is registered for Internal Block Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(diagramType)) {
-
- return false;
- }
-
-
- return true;
- }
-
- @Override
- protected boolean provides(CreateEdgeViewOperation op) {
-
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
-
- // This provider is registered for DatatypeDef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(elementType == DatatypeDefElementTypes.DEPENDENCY) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.PACKAGE_IMPORT) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.COMMENT_ANNOTATED_ELEMENT) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.PACKAGE_MERGE) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.ELEMENT_IMPORT) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.ASSOCIATION) {
- return true;
- }
- if(elementType == DatatypeDefElementTypes.GENERALIZATION) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected boolean provides(CreateNodeViewOperation op) {
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
- // Get the type of the container
- String containerGraphicalType = op.getContainerView().getType();
-
- // This provider is registered for DatatypeDef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the ElementType and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
- if(elementType == DatatypeDefElementTypes.PACKAGE) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.ENUMERATION) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.COMMENT) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.CONSTRAINT) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.DATA_TYPE) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.PRIMITIVE_TYPE) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.SIGNAL) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.PACKAGE_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.DATA_TYPE_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.ENUMERATION_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.PRIMITIVE_TYPE_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN) {
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.SIGNAL_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.COMMENT_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.CONSTRAINT_CN) {
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.SHORT_CUT_DIAGRAM) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN) {
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.DATA_TYPE_PROPERTY_CLN) {
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.DATA_TYPE_OPERATION_CLN) {
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == DatatypeDefElementTypes.SIGNAL_PROPERTY_CLN) {
- if(DatatypeDefElementTypes.SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(DatatypeDefElementTypes.SIGNAL_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
-
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
-
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Enumeration) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Enumeration TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Enumeration ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Enumeration ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.DataType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // DataType TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // DataType ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // DataType ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PrimitiveType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // PrimitiveType TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // PrimitiveType ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // PrimitiveType ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Signal) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Signal TopNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Signal ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Signal ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.EnumerationLiteral) {
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildNode
- return true;
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildNode
- return true;
- }
-
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildLabelNode
- return true;
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildLabelNode
- return true;
- }
- }
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Diagram TopNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(DatatypeDefElementTypes.SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- if(DatatypeDefElementTypes.SIGNAL_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return true;
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return true;
- }
- }
- }
-
- return false;
- }
-
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
-
- if(semanticHint != null) {
- return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- }
-
- // SemanticHint may be null when the element is created indirectly by
- // DND from model explorer
- // ex: Drag and drop a Connector may require to show ConnectorEnd first.
- EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
-
- // Get the type of the container
- String containerGraphicalType = containerView.getType();
-
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PACKAGE.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Enumeration) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Enumeration TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Enumeration ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Enumeration ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.COMMENT.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.COMMENT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Comment ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.COMMENT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.CONSTRAINT.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.CONSTRAINT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Constraint ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.CONSTRAINT_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.DataType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // DataType TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // DataType ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // DataType ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PrimitiveType) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // PrimitiveType TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PRIMITIVE_TYPE.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // PrimitiveType ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PRIMITIVE_TYPE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // PrimitiveType ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.PRIMITIVE_TYPE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Signal) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Signal TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SIGNAL.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Signal ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SIGNAL_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Signal ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SIGNAL_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.EnumerationLiteral) {
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- if(DatatypeDefElementTypes.ENUMERATION_CN_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.ENUMERATION_COMPARTMENT_ENUMERATION_LITERAL_HINT.equals(containerGraphicalType)) { // EnumerationLiteral ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.ENUMERATION_ENUMERATION_LITERAL_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(DatatypeDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Diagram TopNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SHORT_CUT_DIAGRAM.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(DatatypeDefElementTypes.SIGNAL_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SIGNAL_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.SIGNAL_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.SIGNAL_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(DatatypeDefElementTypes.DATA_TYPE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_OPERATION_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(DatatypeDefElementTypes.DATA_TYPE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return super.createNode(semanticAdapter, containerView, DatatypeDefElementTypes.DATA_TYPE_OPERATION_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
-
- log.error(new Exception("Could not create Node."));
- return null;
- }
-
- @Override
- protected void stampShortcut(View containerView, Node target) {
- if(!DatatypeDefEditPart.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", DatatypeDefEditPart.DIAGRAM_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.MF
deleted file mode 100644
index d8260b2bd0e..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.4.1",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.emf.common.ui;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.robotml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0"
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.interfacedef.Act
- ivator
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.interfacedef;
- singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.gen.MF b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.gen.MF
deleted file mode 100644
index e9940c39e42..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/META-INF/MANIFEST.gen.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.papyrus.robotml.diagram.interfacedef;singleton:=true
-Bundle-Version: 0.7.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.robotml.diagram.interfacedef.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.diagram.common,
- org.eclipse.papyrus.core.adaptor.gmf,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.diagram.clazz,
- org.eclipse.papyrus.preferences
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.gen.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.gen.properties
deleted file mode 100644
index ca6d14e16f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.gen.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.properties b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.properties
deleted file mode 100644
index 5b7fa539491..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = src-gen/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- palettes/,\
- model/,\
- about.html,\
- plugin.properties
-src.includes = about.html
-
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceDiagram.gif b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceDiagram.gif
deleted file mode 100644
index 0bbbb57754f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/icons/obj16/interfaceDiagram.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/model/Proteus.interfacedef.idgen b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/model/Proteus.interfacedef.idgen
deleted file mode 100644
index e200f08749f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/model/Proteus.interfacedef.idgen
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<diagramcontent:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:diagramcontent="http://www.eclipse.org/papyrus/0.7.0/diagramcontent" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" name="InterfaceDef" label="Interface Definition Diagram" icon="icons/obj16/interfaceDiagram.gif" hint="InterfaceDef" javaPackagePrefix="org.eclipse.papyrus.robotml.diagram.interfacedef" javaClassPrefix="InterfaceDef" language="proteus" createCommandLabel="Create a new Proteus Interface Definition Diagram">
- <diagramEditPart name="InterfaceDefEditPart">
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.diagram.clazz.custom.policies.RemoveOrphanViewPolicy" key="&quot;RemoveOrphanView&quot;"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.robotml.diagram.interfacedef.edit.policy.InterfaceDefDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
- </diagramEditPart>
- <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy" paletteToolPrefix="clazz.tool">
- <genInheritedEditor href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/>
- <genNodes>
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
- </genNodes>
- <genNodes>
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.13"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.19"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.15"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.6"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.15"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.29"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.30"/>
- </genNodes>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.13"/>
- </genLinks>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.17"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.14"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.4"/>
- </genLinks>
- <genLinks name="">
- <genLink href="../../org.eclipse.papyrus.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.5"/>
- </genLinks>
- </inheritedDiagrams>
-</diagramcontent:Diagram>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.gen.xml
deleted file mode 100644
index da894e7df53..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/palettes/interfacedef.palette.gen.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.PROTEUS_InterfaceDef__Tools" name="Tools">
- <aspectTool description="Create a new Package" id="interfacedef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Comment" id="interfacedef.tool.comment"
- name="Comment" refToolId="clazz.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="interfacedef.tool.constraint"
- name="Constraint" refToolId="clazz.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Package" id="interfacedef.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Interface" id="interfacedef.tool.interface"
- name="Interface" refToolId="clazz.tool.interface">
- </aspectTool>
- <aspectTool description="Create a new Interface" id="interfacedef.tool.interface"
- name="Interface" refToolId="clazz.tool.interface">
- </aspectTool>
- <aspectTool description="Create a new Diagram" id="interfacedef.tool.diagram"
- name="Diagram" refToolId=>
- </aspectTool>
- <aspectTool description="Create a new Property" id="interfacedef.tool.property"
- name="Property" refToolId="clazz.tool.property">
- </aspectTool>
- <aspectTool description="Create a new Operation" id="interfacedef.tool.operation"
- name="Operation" refToolId="clazz.tool.operation">
- </aspectTool>
- <aspectTool description="Create a new Class" id="interfacedef.tool.class"
- name="Class" refToolId="clazz.tool.class">
- </aspectTool>
- <aspectTool description="Create a new PackageImport" id="interfacedef.tool.packageimport"
- name="PackageImport" refToolId="clazz.tool.packageimport">
- </aspectTool>
- <aspectTool description="Create a new CommentAnnotatedElement" id="interfacedef.tool.commentannotatedelement"
- name="CommentAnnotatedElement" refToolId="clazz.tool.link">
- </aspectTool>
- <aspectTool description="Create a new ConstraintConstrainedElement" id="interfacedef.tool.constraintconstrainedelement"
- name="ConstraintConstrainedElement" refToolId="clazz.tool.link">
- </aspectTool>
- <aspectTool description="Create a new PackageMerge" id="interfacedef.tool.packagemerge"
- name="PackageMerge" refToolId="clazz.tool.packagemerge">
- </aspectTool>
- <aspectTool description="Create a new Generalization" id="interfacedef.tool.generalization"
- name="Generalization" refToolId="clazz.tool.generalization">
- </aspectTool>
- <aspectTool description="Create a new InterfaceRealization" id="interfacedef.tool.interfacerealization"
- name="InterfaceRealization" refToolId="clazz.tool.interfacerealization">
- </aspectTool>
- </drawer>
- </content>
-</paletteDefinition>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.gen.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.gen.xml
deleted file mode 100644
index b3be730c444..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.gen.xml
+++ /dev/null
@@ -1,506 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefCreateCommand"
- icon="icons/obj16/interfaceDiagram.gif"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- language="proteus"
- label="Interface Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefEditorFactory"
- icon="icons/obj16/interfaceDiagram.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- name="Create a new Proteus Interface Definition Diagram"
- description="Create a new Proteus Interface Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceDiagram.gif" label="Create a new Proteus Interface Definition Diagram"
- style="push" tooltip="Create a new Proteus Interface Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceDiagram.gif" label="Create a new Proteus Interface Definition Diagram"
- style="push" tooltip="Create a new Proteus Interface Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceDiagram.gif"
- label="Create a new Proteus Interface Definition Diagram"
- style="push"
- tooltip="Create a new Proteus Interface Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.diagram.common.paletteDefinition"
- name="PROTEUS_InterfaceDef">
-
- <paletteDefinition ID="PROTEUS_InterfaceDef"
- class="org.eclipse.papyrus.diagram.common.service.PluginPaletteProvider"
- name="PROTEUS_InterfaceDef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/interfacedef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.interfacedef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="InterfaceDef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InheritedClassDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2007" = PACKAGE
- "2012" = COMMENT
- "2011" = CONSTRAINT
- "3009" = PACKAGE_CN
- "3023" = INTERFACE_CN
- "2004" = INTERFACE
- "2016" = SHORT_CUT_DIAGRAM
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 2012, 2011, 3009, 3023, 2004, 2016"/>
-
- <!--
- "3006" = INTERFACE_PROPERTY_CLN
- "3007" = INTERFACE_OPERATION_CLN
- "3008" = INTERFACE_CLASS_CLN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3006, 3007, 3008"/>
-
- <!--
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "4002" = GENERALIZATION
- "4003" = INTERFACE_REALIZATION
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4010, 4013, 4014, 4011, 4002, 4003"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Interface" -->
- <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Interface"/>
- </object>
-
- <!-- "notation.Diagram" -->
- <object id="notation.Diagram" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="notation.Diagram"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Operation" -->
- <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Operation"/>
- </object>
-
- <!-- "uml.Class" -->
- <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Class"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.PackageMerge" -->
- <object id="uml.PackageMerge" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageMerge"/>
- </object>
-
- <!-- "uml.Generalization" -->
- <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Generalization"/>
- </object>
-
- <!-- "uml.InterfaceRealization" -->
- <object id="uml.InterfaceRealization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.InterfaceRealization"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Comment, uml.Constraint, uml.Interface, notation.Diagram, uml.Property, uml.Operation, uml.Class"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.PackageImport, uml.PackageMerge, uml.Generalization, uml.InterfaceRealization"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="InterfaceDef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3023" = INTERFACE_CN
- "5049" = INTERFACE_CN_LABEL_NAME_HINT
- "7027" = INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT
- "7028" = INTERFACE_CN_COMPARTMENT_OPERATION_HINT
- "7029" = INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT
- "2004" = INTERFACE
- "5011" = INTERFACE_LABEL_NAME_HINT
- "7006" = INTERFACE_COMPARTMENT_ATTRIBUTE_HINT
- "7007" = INTERFACE_COMPARTMENT_OPERATION_HINT
- "7008" = INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT
- "2016" = SHORT_CUT_DIAGRAM
- "0" = SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="INTERFACE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3023, 5049, 7027, 7028, 7029"/>
- </object>
- <object
- id="INTERFACE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2004, 5011, 7006, 7007, 7008"/>
- </object>
- <object
- id="SHORT_CUT_DIAGRAM"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2016, 0"/>
- </object>
-
- <!--
- "3006" = INTERFACE_PROPERTY_CLN
- "3007" = INTERFACE_OPERATION_CLN
- "3008" = INTERFACE_CLASS_CLN
- -->
- <object
- id="INTERFACE_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3006"/>
- </object>
- <object
- id="INTERFACE_OPERATION_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3007"/>
- </object>
- <object
- id="INTERFACE_CLASS_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3008"/>
- </object>
-
- <!--
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "6030" = PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT
- "4002" = GENERALIZATION
- "6007" = GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT
- "4003" = INTERFACE_REALIZATION
- "6008" = INTERFACE_REALIZATION_LABEL_APPLIED_STEREOTYPE_HINT
- "6009" = INTERFACE_REALIZATION_LABEL_NAME2_HINT
- -->
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
- <object
- id="PACKAGE_MERGE"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4011, 6030"/>
- </object>
- <object
- id="GENERALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002, 6007"/>
- </object>
- <object
- id="INTERFACE_REALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4003, 6008, 6009"/>
- </object>
-
- <context views="PACKAGE, COMMENT, CONSTRAINT, PACKAGE_CN, INTERFACE_CN, INTERFACE, DIAGRAM"/>
- <context views="INTERFACE_PROPERTY_CLN, INTERFACE_OPERATION_CLN, INTERFACE_CLASS_CLN"/>
- <context views="PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT, PACKAGE_MERGE, GENERALIZATION, INTERFACE_REALIZATION"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- name="InterfaceDef Diagram"
- category="org.eclipse.papyrus.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceDefGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- name="Interface">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- name="Interface">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.DiagramPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.DiagramPreferencePage"
- name="Diagram">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageMergePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageMergePreferencePage"
- name="PackageMerge">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.GeneralizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.GeneralizationPreferencePage"
- name="Generalization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceRealizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceRealizationPreferencePage"
- name="InterfaceRealization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.OperationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.OperationPreferencePage"
- name="Operation">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ClassPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ClassPreferencePage"
- name="Class">
- </page>
-
-</extension>
-
-</plugin> \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.xml
deleted file mode 100644
index 64469e0f89e..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.xml
+++ /dev/null
@@ -1,525 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.contexts">
- <context
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.diagramContext"
- name="InterfaceDefDiagramContext"
- parentId="org.eclipse.papyrus.uml.diagram.clazz.ui.diagramContext">
- </context>
- </extension>
- <!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefCreateCommand"
- icon="icons/obj16/interfaceI.gif"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- language="robotML"
- label="Interface Definition Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefEditorFactory"
- icon="icons/obj16/interfaceI.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- name="Create a new RobotML Interface Definition Diagram"
- description="Create a new RobotML Interface Definition Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.InterfaceDefCreateCommand"
- commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceI.gif" label="Create a new RobotML Interface Definition Diagram"
- style="push" tooltip="Create a new RobotML Interface Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <menu id="org.eclipse.robotml.ui.toolbar" label="Diagrams">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceI.gif" label="Create a new RobotML Interface Definition Diagram"
- style="push" tooltip="Create a new RobotML Interface Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <!--menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceI.gif" label="Create a new Proteus Interface Definition Diagram"
- style="push" tooltip="Create a new Proteus Interface Definition Diagram">
- <visibleWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.core.papyrusEditor"/>
- </with>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution-->
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.robotml.diagram.interfacedef.CreateCommand"
- icon="icons/obj16/interfaceI.gif"
- label="Create a new RobotML Interface Definition Diagram"
- style="push"
- tooltip="Create a new RobotML Interface Definition Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.robotml.diagram.common.IsPapyrusActiveWithRobotml">
- </reference>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="ROBOTML_InterfaceDef">
-
- <paletteDefinition ID="ROBOTML_InterfaceDef"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="ROBOTML_InterfaceDef" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/interfacedef.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.robotml.diagram.interfacedef"/>
- </paletteDefinition>
-</extension>
-
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
-
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="InterfaceDef"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InheritedClassDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2007" = PACKAGE
- "2012" = COMMENT
- "2011" = CONSTRAINT
- "3009" = PACKAGE_CN
- "3023" = INTERFACE_CN
- "2004" = INTERFACE
- "2016" = SHORT_CUT_DIAGRAM
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 2012, 2011, 3009, 3023, 2004, 2016"/>
-
- <!--
- "3006" = INTERFACE_PROPERTY_CLN
- "3007" = INTERFACE_OPERATION_CLN
- "3008" = INTERFACE_CLASS_CLN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="3006, 3007, 3008"/>
-
- <!--
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "4002" = GENERALIZATION
- "4003" = INTERFACE_REALIZATION
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4010, 4013, 4014, 4011, 4002, 4003"/>
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Interface" -->
- <object id="uml.Interface" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Interface"/>
- </object>
-
- <!-- "notation.Diagram" -->
- <object id="notation.Diagram" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="notation.Diagram"/>
- </object>
-
- <!-- "uml.Property" -->
- <object id="uml.Property" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Property"/>
- </object>
-
- <!-- "uml.Operation" -->
- <object id="uml.Operation" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Operation"/>
- </object>
-
- <!-- "uml.Class" -->
- <object id="uml.Class" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Class"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.PackageMerge" -->
- <object id="uml.PackageMerge" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageMerge"/>
- </object>
-
- <!-- "uml.Generalization" -->
- <object id="uml.Generalization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Generalization"/>
- </object>
-
- <!-- "uml.InterfaceRealization" -->
- <object id="uml.InterfaceRealization" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.InterfaceRealization"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Comment, uml.Constraint, uml.Interface, notation.Diagram, uml.Property, uml.Operation, uml.Class"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.PackageImport, uml.PackageMerge, uml.Generalization, uml.InterfaceRealization"/>
-
- </viewProvider>
-
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="InterfaceDef"/>
- </object>
- </editpartProvider>
-
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3023" = INTERFACE_CN
- "5049" = INTERFACE_CN_LABEL_NAME_HINT
- "7027" = INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT
- "7028" = INTERFACE_CN_COMPARTMENT_OPERATION_HINT
- "7029" = INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT
- "2004" = INTERFACE
- "5011" = INTERFACE_LABEL_NAME_HINT
- "7006" = INTERFACE_COMPARTMENT_ATTRIBUTE_HINT
- "7007" = INTERFACE_COMPARTMENT_OPERATION_HINT
- "7008" = INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT
- "2016" = SHORT_CUT_DIAGRAM
- "0" = SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="INTERFACE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3023, 5049, 7027, 7028, 7029"/>
- </object>
- <object
- id="INTERFACE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2004, 5011, 7006, 7007, 7008"/>
- </object>
- <object
- id="SHORT_CUT_DIAGRAM"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2016, 0"/>
- </object>
-
- <!--
- "3006" = INTERFACE_PROPERTY_CLN
- "3007" = INTERFACE_OPERATION_CLN
- "3008" = INTERFACE_CLASS_CLN
- -->
- <object
- id="INTERFACE_PROPERTY_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3006"/>
- </object>
- <object
- id="INTERFACE_OPERATION_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3007"/>
- </object>
- <object
- id="INTERFACE_CLASS_CLN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3008"/>
- </object>
-
- <!--
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- "4011" = PACKAGE_MERGE
- "6030" = PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT
- "4002" = GENERALIZATION
- "6007" = GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT
- "4003" = INTERFACE_REALIZATION
- "6008" = INTERFACE_REALIZATION_LABEL_APPLIED_STEREOTYPE_HINT
- "6009" = INTERFACE_REALIZATION_LABEL_NAME2_HINT
- -->
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
- <object
- id="PACKAGE_MERGE"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4011, 6030"/>
- </object>
- <object
- id="GENERALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4002, 6007"/>
- </object>
- <object
- id="INTERFACE_REALIZATION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4003, 6008, 6009"/>
- </object>
-
- <context views="PACKAGE, COMMENT, CONSTRAINT, PACKAGE_CN, INTERFACE_CN, INTERFACE, SHORT_CUT_DIAGRAM"/>
- <context views="INTERFACE_PROPERTY_CLN, INTERFACE_OPERATION_CLN, INTERFACE_CLASS_CLN"/>
- <context views="PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, CONSTRAINT_CONSTRAINED_ELEMENT, PACKAGE_MERGE, GENERALIZATION, INTERFACE_REALIZATION"/>
-
- </editpartProvider>
-
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- name="InterfaceDef Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceDefGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- name="Interface">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage"
- name="Interface">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.DiagramPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.DiagramPreferencePage"
- name="Diagram">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentAnnotatedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentAnnotatedElementPreferencePage"
- name="CommentAnnotatedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintConstrainedElementPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintConstrainedElementPreferencePage"
- name="ConstraintConstrainedElement">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageMergePreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageMergePreferencePage"
- name="PackageMerge">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.GeneralizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.GeneralizationPreferencePage"
- name="Generalization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceRealizationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceRealizationPreferencePage"
- name="InterfaceRealization">
- </page>
-
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PropertyPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PropertyPreferencePage"
- name="Property">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.OperationPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.OperationPreferencePage"
- name="Operation">
- </page>
-
- <page category="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences"
- class="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ClassPreferencePage"
- id="org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ClassPreferencePage"
- name="Class">
- </page>
-
-</extension>
-</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/Activator.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/Activator.java
deleted file mode 100644
index 6d5582b43b8..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/Activator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceDefPreferenceInitializer;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.robotml.diagram.interfacedef";
-
- /** The plug-in shared instance */
- private static Activator plugin;
-
- /** The logging helper */
- public static LogHelper log;
-
- /** The plug-in Preference store */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
-
- /** Default constructor */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- // register the login helper
- log = new LogHelper(plugin);
-
- // register the preference store
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
-
- // Preferences initialization
- InterfaceDefPreferenceInitializer diagramPreferenceInitializer = new InterfaceDefPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getInstance() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- *
- * @return Shared Preference Store.
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
- return store;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefCreateCommand.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefCreateCommand.java
deleted file mode 100644
index 471810f56f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefCreateCommand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class InterfaceDefCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- @Override
- protected String getDefaultDiagramName() {
- return openDiagramNameDialog("InterfacesDiagram");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return InterfaceDefEditPart.DIAGRAM_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefEditorFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefEditorFactory.java
deleted file mode 100644
index 2ee1f376c47..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefEditorFactory.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class InterfaceDefEditorFactory extends GmfEditorFactory {
-
- public InterfaceDefEditorFactory() {
- super(InterfaceDefForMultiEditor.class, InterfaceDefEditPart.DIAGRAM_ID);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefForMultiEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefForMultiEditor.java
deleted file mode 100644
index cb59c024859..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/InterfaceDefForMultiEditor.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.part.InterfaceDefEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
- *
- */
-public class InterfaceDefForMultiEditor extends InterfaceDefEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/interfaceDiagram.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(InterfaceDefForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- *
- */
- public InterfaceDefForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.robotml.diagram.interfacedef.EditingDomain";
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/part/InterfaceDefEditPart.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/part/InterfaceDefEditPart.java
deleted file mode 100644
index 5f4373803f2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/part/InterfaceDefEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.policy.InterfaceDefDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-
-public class InterfaceDefEditPart extends DiagramEditPart {
-
- public final static String DIAGRAM_ID = "InterfaceDef"; //$NON-NLS-1$
-
- public InterfaceDefEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new InterfaceDefDragDropEditPolicy());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/policy/InterfaceDefDragDropEditPolicy.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/policy/InterfaceDefDragDropEditPolicy.java
deleted file mode 100644
index 1d65b3b9acb..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/edit/policy/InterfaceDefDragDropEditPolicy.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.provider.InterfaceDefElementTypes;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
-
-/** Customization of the DND edit policy for the InterfaceDef Diagram */
-public class InterfaceDefDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
-
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- return new Integer(getNodeGraphicalHint(containerView, domainElement));
- }
-
- protected String getNodeGraphicalHint(View containerView, EObject domainElement) {
- String UNDEFINED = "-1";
-
- String containerGraphicalHint = containerView.getType();
- if(containerGraphicalHint == null) {
- // Cannot guess domain element graphical hint.
- return UNDEFINED;
- }
-
- // Fill the semantic hint during the drop
- // Elements inherited from ClassDiagram
- // Dropping Package
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.PACKAGE.getSemanticHint();
- }
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.PACKAGE_CN.getSemanticHint();
- }
-
- } else
- // Dropping Comment
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.COMMENT.getSemanticHint();
- }
-
- } else
- // Dropping Constraint
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.CONSTRAINT.getSemanticHint();
- }
-
- } else
- // Dropping Interface
- if(domainElement instanceof org.eclipse.uml2.uml.Interface) {
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_CN.getSemanticHint();
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_CN.getSemanticHint();
- }
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE.getSemanticHint();
- }
-
- } else
- // Dropping Diagram
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.SHORT_CUT_DIAGRAM.getSemanticHint();
- }
-
- } else
- // Dropping Property
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_PROPERTY_CLN.getSemanticHint();
- }
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_PROPERTY_CLN.getSemanticHint();
- }
- } else
- // Dropping Operation
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_OPERATION_CLN.getSemanticHint();
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_OPERATION_CLN.getSemanticHint();
- }
- } else
- // Dropping Class
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_CLASS_CLN.getSemanticHint();
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalHint)) {
- return InterfaceDefElementTypes.INTERFACE_CLASS_CLN.getSemanticHint();
- }
- }
-
- return UNDEFINED;
- }
-
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- return new Integer(getLinkGraphicalHint(domainElement));
- }
-
- protected String getLinkGraphicalHint(EObject domainElement) {
- String UNDEFINED = "-1";
-
- if(domainElement instanceof org.eclipse.uml2.uml.PackageImport) {
- return InterfaceDefElementTypes.PACKAGE_IMPORT.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PackageMerge) {
- return InterfaceDefElementTypes.PACKAGE_MERGE.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Generalization) {
- return InterfaceDefElementTypes.GENERALIZATION.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.InterfaceRealization) {
- return InterfaceDefElementTypes.INTERFACE_REALIZATION.getSemanticHint();
- }
-
- return UNDEFINED;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/factory/InterfaceDefViewFactory.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/factory/InterfaceDefViewFactory.java
deleted file mode 100644
index 09bf56468ff..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/factory/InterfaceDefViewFactory.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.factory;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-
-public class InterfaceDefViewFactory extends DiagramViewFactory {
-
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/part/InterfaceDefEditor.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/part/InterfaceDefEditor.java
deleted file mode 100644
index 9fb334aa651..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/part/InterfaceDefEditor.java
+++ /dev/null
@@ -1,485 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.part;
-
-import java.util.EventObject;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class InterfaceDefEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.robotml.diagram.interfacedef.part.InterfaceDefEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public InterfaceDefEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
- }
-
- /**
- * @generated
- */
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- public String getContributorId() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @generated
- */
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
-
- // Replace diagram contextual menu removing default
- // delete from model action.
- DiagramContextMenuProvider provider = (DiagramContextMenuProvider)getDiagramGraphicalViewer().getContextMenu();
- Set<String> menuExclusions = provider.getExclusionSet();
- menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
- provider.setExclusionSet(menuExclusions);
- }
-
- /**
- * @generated
- */
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- savedOperation = getOperationHistory().getUndoOperation(getUndoContext());
- }
-
- /**
- * @generated
- */
- public boolean isDirty() {
- IUndoableOperation op = getOperationHistory().getUndoOperation(getUndoContext());
- return savedOperation != op;
- }
-
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ClassPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ClassPreferencePage.java
deleted file mode 100644
index 1cf3c46f9de..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ClassPreferencePage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class ClassPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Class";
-
- public ClassPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Class"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentAnnotatedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentAnnotatedElementPreferencePage.java
deleted file mode 100644
index 10feeaa284c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentAnnotatedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class CommentAnnotatedElementPreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_CommentAnnotatedElement";
-
- public CommentAnnotatedElementPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentPreferencePage.java
deleted file mode 100644
index 43f7ebbd698..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class CommentPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Comment";
-
-
- public CommentPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintConstrainedElementPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintConstrainedElementPreferencePage.java
deleted file mode 100644
index b78ec056fe2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintConstrainedElementPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class ConstraintConstrainedElementPreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement";
-
- public ConstraintConstrainedElementPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index 7001332cb00..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class ConstraintPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Constraint";
-
-
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java
deleted file mode 100644
index d5ff1b1b0de..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class DiagramPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Diagram";
-
-
- public DiagramPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Diagram"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/GeneralizationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/GeneralizationPreferencePage.java
deleted file mode 100644
index 925b78dcc80..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/GeneralizationPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class GeneralizationPreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Generalization";
-
- public GeneralizationPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Generalization"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefGeneralPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefGeneralPreferencePage.java
deleted file mode 100644
index ff15322865f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefGeneralPreferencePage.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-
-public class InterfaceDefGeneralPreferencePage extends DiagramPreferencePage {
-
- public InterfaceDefGeneralPreferencePage() {
- setPreferenceStore(Activator.getInstance().getPreferenceStore());
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefLinkPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefLinkPreferencePage.java
deleted file mode 100644
index 129ee4c3f53..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefLinkPreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-
-public class InterfaceDefLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefNodePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefNodePreferencePage.java
deleted file mode 100644
index 8e00bef0efa..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefNodePreferencePage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-
-public class InterfaceDefNodePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefPreferenceInitializer.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefPreferenceInitializer.java
deleted file mode 100644
index 032aee4249f..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceDefPreferenceInitializer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-
-public class InterfaceDefPreferenceInitializer extends AbstractPreferenceInitializer {
-
- protected IPreferenceStore getPreferenceStore() {
- return Activator.getInstance().getPreferenceStore();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfacePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.DiagramPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageImportPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.CommentAnnotatedElementPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.ConstraintConstrainedElementPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.PackageMergePreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.GeneralizationPreferencePage.initDefaults(store);
- org.eclipse.papyrus.robotml.diagram.interfacedef.preferences.InterfaceRealizationPreferencePage.initDefaults(store);
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java
deleted file mode 100644
index 418ace190c6..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class InterfacePreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Interface";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "AttributeCompartment", "OperationCompartment", "NestedClassifierCompartment" };
-
- public InterfacePreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Interface"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceRealizationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceRealizationPreferencePage.java
deleted file mode 100644
index b7699f540f1..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfaceRealizationPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class InterfaceRealizationPreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_InterfaceRealization";
-
- public InterfaceRealizationPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_InterfaceRealization"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/OperationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/OperationPreferencePage.java
deleted file mode 100644
index 2958c0ebd7d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/OperationPreferencePage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class OperationPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Operation";
-
- public OperationPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Operation"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageImportPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageImportPreferencePage.java
deleted file mode 100644
index b3148315a9a..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageImportPreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class PackageImportPreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_PackageImport";
-
- public PackageImportPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_PackageImport"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageMergePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageMergePreferencePage.java
deleted file mode 100644
index ebb8d560412..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackageMergePreferencePage.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class PackageMergePreferencePage extends InterfaceDefLinkPreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_PackageMerge";
-
- public PackageMergePreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_PackageMerge"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
-
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java
deleted file mode 100644
index 36b92ad4487..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class PackagePreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Package";
-
- /**
- * the list of the compartments for this node
- */
- public static final String compartments[] = { "PackageableElementCompartment" };
-
- public PackagePreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // set the true value for the compartment visibility
- for(String name : compartments) {
- String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(preferenceName, true);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.preferences.pages.AbstractPapyrusNodePreferencePage#initializeCompartmentsList()
- *
- */
- @Override
- protected void initializeCompartmentsList() {
- for(String name : compartments) {
- this.compartmentsList.add(name);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PropertyPreferencePage.java
deleted file mode 100644
index bdb1d3b6030..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PropertyPreferencePage.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class PropertyPreferencePage extends InterfaceDefNodePreferencePage {
-
- public static String prefKey = InterfaceDefEditPart.DIAGRAM_ID + "_Property";
-
- public PropertyPreferencePage() {
- super();
- setPreferenceKey(InterfaceDefEditPart.DIAGRAM_ID + "_Property"); //$NON-NLS-1$
- }
-
- public static void initDefaults(IPreferenceStore store) {
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramEditPartProvider.java
deleted file mode 100644
index d8f481dc88c..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramEditPartProvider.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLEditPartProvider;
-
-public class InheritedClassDiagramEditPartProvider extends UMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is a InterfaceDef Diagram
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(view.getDiagram().getType())) {
- return false;
- }
-
- // Test supported inherited types
- EObject eobject = view.getElement();
-
- /** Nodes (and ChildLabelNodes) *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Package) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Comment) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Constraint) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Interface) {
- return true;
- }
- if(eobject instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Property) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Operation) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Class) {
- return true;
- }
-
- /** Edges *********** */
- if(eobject instanceof org.eclipse.uml2.uml.PackageImport) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.PackageMerge) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Generalization) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.InterfaceRealization) {
- return true;
- }
-
- // Additional test needed here to decide whether to support Feature type links.
- // As feature type link are not related to a MetaClass from the domain model
- // they are not already handled by previous tests.
- String hint = view.getType();
-
- /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
- if(InterfaceDefElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
- if(InterfaceDefElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramViewProvider.java
deleted file mode 100644
index da053da7c2d..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InheritedClassDiagramViewProvider.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
-
-public class InheritedClassDiagramViewProvider extends UMLViewProvider {
-
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- // No need to override here, assuming provides is correctly implemented.
- Edge createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
-
- if(createdEdge == null) {
- Activator.log.error(new Exception("Could not create Edge."));
- }
-
- return createdEdge;
- }
-
- protected boolean provides(CreateViewForKindOperation op) {
-
- // This provider is registered for Internal Block Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- return true;
- }
-
- @Override
- protected boolean provides(CreateEdgeViewOperation op) {
-
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
-
- // This provider is registered for InterfaceDef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(elementType == InterfaceDefElementTypes.PACKAGE_IMPORT) {
- return true;
- }
- if(elementType == InterfaceDefElementTypes.COMMENT_ANNOTATED_ELEMENT) {
- return true;
- }
- if(elementType == InterfaceDefElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
- return true;
- }
- if(elementType == InterfaceDefElementTypes.PACKAGE_MERGE) {
- return true;
- }
- if(elementType == InterfaceDefElementTypes.GENERALIZATION) {
- return true;
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE_REALIZATION) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected boolean provides(CreateNodeViewOperation op) {
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
- // Get the type of the container
- String containerGraphicalType = op.getContainerView().getType();
-
- // This provider is registered for InterfaceDef Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the ElementType and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
- if(elementType == InterfaceDefElementTypes.PACKAGE) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.COMMENT) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.CONSTRAINT) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.PACKAGE_CN) {
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE_CN) {
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.SHORT_CUT_DIAGRAM) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE_PROPERTY_CLN) {
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE_OPERATION_CLN) {
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == InterfaceDefElementTypes.INTERFACE_CLASS_CLN) {
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
-
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
-
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return true;
- }
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Interface) {
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Interface ChildNode
- return true;
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Interface ChildNode
- return true;
- }
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Interface TopNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Diagram TopNode
- return true;
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return true;
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return true;
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) { // Class ChildLabelNode
- return true;
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) { // Class ChildLabelNode
- return true;
- }
- }
- }
-
- return false;
- }
-
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
- if(semanticHint != null) {
- return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- }
-
- // SemanticHint may be null when the element is created indirectly by
- // DND from model explorer
- // ex: Drag and drop a Connector may require to show ConnectorEnd first.
- EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
-
- // Get the type of the container
- String containerGraphicalType = containerView.getType();
-
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Package TopNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.PACKAGE.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Package ChildNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.PACKAGE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Comment TopNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.COMMENT.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Constraint TopNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.CONSTRAINT.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Interface) {
- if(InterfaceDefElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Interface ChildNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) { // Interface ChildNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_CN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Interface TopNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.gmf.runtime.notation.Diagram) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(containerGraphicalType)) { // Diagram TopNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.SHORT_CUT_DIAGRAM.getSemanticHint(), index, persisted, preferencesHint);
- }
-
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Property) {
-
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_ATTRIBUTE_HINT.equals(containerGraphicalType)) { // Property ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_PROPERTY_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Operation) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_OPERATION_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_OPERATION_HINT.equals(containerGraphicalType)) { // Operation ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_OPERATION_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Class) {
-
- if(InterfaceDefElementTypes.INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) { // Class ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_CLASS_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- if(InterfaceDefElementTypes.INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT.equals(containerGraphicalType)) { // Class ChildLabelNode
- return super.createNode(semanticAdapter, containerView, InterfaceDefElementTypes.INTERFACE_CLASS_CLN.getSemanticHint(), index, persisted, preferencesHint);
- }
- }
-
- Activator.log.error(new Exception("Could not create Node."));
- return null;
- }
-
- @Override
- protected void stampShortcut(View containerView, Node target) {
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", InterfaceDefEditPart.DIAGRAM_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPartProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPartProvider.java
deleted file mode 100644
index 8e2db8a17c2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPartProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-
-public class InterfaceDefEditPartProvider extends AbstractEditPartProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is InterfaceDef Diagram
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(view.getType())) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramEditPartClass(View view) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(view.getType())) {
- return InterfaceDefEditPart.class;
- }
-
- Activator.log.error(new Exception("Could not create EditPart."));
- return null;
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPolicyProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPolicyProvider.java
deleted file mode 100644
index cc065bfcef2..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefEditPolicyProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.policy.InterfaceDefDragDropEditPolicy;
-
-public class InterfaceDefEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- public boolean provides(IOperation operation) {
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!InterfaceDefEditPart.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceOperationCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceAttributeCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceOperationCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ShortCutDiagramEditPart) {
- return true;
- }
-
- return false;
- }
-
- public void createEditPolicies(EditPart editPart) {
- editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new InterfaceDefDragDropEditPolicy());
- }
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefElementTypes.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefElementTypes.java
deleted file mode 100644
index 9bb78832c5b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefElementTypes.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-public class InterfaceDefElementTypes extends AbstractElementTypeEnumerator {
-
- /** ********************************************************* */
- /** Interface Definition Diagram specific elements **************** */
- /** ********************************************************* */
-
- /** Interface Definition Diagram :: Diagram */
- public static final IHintedType INTERFACE_DEF_DIAGRAM = (IHintedType)getElementType("InterfaceDef"); //$NON-NLS-1$
-
-
-
-
- /** ********************************************************* */
- /** Interface Definition Diagram - ClassDiagram related elements */
- /** ********************************************************* */
-
-
- /** ClassDiagram :: PACKAGE */
- public static final IHintedType PACKAGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_2007"); //$NON-NLS-1$
-
- public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7016";
-
- public static final String PACKAGE_LABEL_NAME_HINT = "5026";
-
- /** ClassDiagram :: COMMENT */
- public static final IHintedType COMMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"); //$NON-NLS-1$
-
- public static final String COMMENT_LABEL_BODY_HINT = "5038";
-
- /** ClassDiagram :: CONSTRAINT */
- public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_NAME_HINT = "5037";
-
- public static final String CONSTRAINT_LABEL_BODY_HINT = "5159";
-
- /** ClassDiagram :: PACKAGE_CN */
- public static final IHintedType PACKAGE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_3009"); //$NON-NLS-1$
-
- public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7010";
-
- public static final String PACKAGE_CN_LABEL_NAME_HINT = "5017";
-
- /** ClassDiagram :: INTERFACE_CN */
- public static final IHintedType INTERFACE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Interface_3023"); //$NON-NLS-1$
-
- public static final String INTERFACE_CN_COMPARTMENT_ATTRIBUTE_HINT = "7027";
-
- public static final String INTERFACE_CN_COMPARTMENT_OPERATION_HINT = "7028";
-
- public static final String INTERFACE_CN_COMPARTMENT_NESTED_CLASSIFIER_HINT = "7029";
-
- public static final String INTERFACE_CN_LABEL_NAME_HINT = "5049";
-
- /** ClassDiagram :: INTERFACE */
- public static final IHintedType INTERFACE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"); //$NON-NLS-1$
-
- public static final String INTERFACE_COMPARTMENT_ATTRIBUTE_HINT = "7006";
-
- public static final String INTERFACE_COMPARTMENT_OPERATION_HINT = "7007";
-
- public static final String INTERFACE_COMPARTMENT_NESTED_CLASSIFIER_HINT = "7008";
-
- public static final String INTERFACE_LABEL_NAME_HINT = "5011";
-
- /** ClassDiagram :: SHORT_CUT_DIAGRAM */
- public static final IHintedType SHORT_CUT_DIAGRAM = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Diagram_2016"); //$NON-NLS-1$
-
- public static final String SHORT_CUT_DIAGRAM_LABEL_DIAGRAM_NAME_HINT = "0";
-
-
- /** ClassDiagram :: PACKAGE_IMPORT */
- public static final IHintedType PACKAGE_IMPORT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"); //$NON-NLS-1$
-
- public static final String PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT = "6022";
-
- /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */
- public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"); //$NON-NLS-1$
-
- /** ClassDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
- public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"); //$NON-NLS-1$
-
- /** ClassDiagram :: PACKAGE_MERGE */
- public static final IHintedType PACKAGE_MERGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011"); //$NON-NLS-1$
-
- public static final String PACKAGE_MERGE_LABEL_APPLIED_STEREOTYPE_HINT = "6030";
-
- /** ClassDiagram :: GENERALIZATION */
- public static final IHintedType GENERALIZATION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002"); //$NON-NLS-1$
-
- public static final String GENERALIZATION_LABEL_APPLIED_STEREOTYPER_HINT = "6007";
-
- /** ClassDiagram :: INTERFACE_REALIZATION */
- public static final IHintedType INTERFACE_REALIZATION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003"); //$NON-NLS-1$
-
- public static final String INTERFACE_REALIZATION_LABEL_APPLIED_STEREOTYPE_HINT = "6008";
-
- public static final String INTERFACE_REALIZATION_LABEL_NAME2_HINT = "6009";
-
- /** ClassDiagram :: ChildLabelNodes */
- public static final IHintedType INTERFACE_PROPERTY_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Property_3006"); //$NON-NLS-1$
-
- public static final IHintedType INTERFACE_OPERATION_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Operation_3007"); //$NON-NLS-1$
-
- public static final IHintedType INTERFACE_CLASS_CLN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Class_3008"); //$NON-NLS-1$
-
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefViewProvider.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefViewProvider.java
deleted file mode 100644
index 7793878413b..00000000000
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/provider/InterfaceDefViewProvider.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.robotml.diagram.interfacedef.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.Activator;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
-import org.eclipse.papyrus.robotml.diagram.interfacedef.factory.InterfaceDefViewFactory;
-
-public class InterfaceDefViewProvider extends AbstractViewProvider {
-
- @Override
- protected boolean provides(CreateDiagramViewOperation operation) {
-
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(operation.getSemanticHint())) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
- if(InterfaceDefEditPart.DIAGRAM_ID.equals(diagramKind)) {
- return InterfaceDefViewFactory.class;
- }
-
- Activator.log.error(new Exception("Could not create View."));
- return null;
- }
-}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.help/plugin.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml.help/plugin.xml
index 00836fc31f5..652f8c291d3 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.help/plugin.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.help/plugin.xml
@@ -2,7 +2,7 @@
<?eclipse version="3.4"?>
<plugin>
- <extension
+ <!--extension
point="org.eclipse.help.toc">
<toc
file="toc.xml">
@@ -11,6 +11,6 @@
file="testToc.xml"
primary="true">
</toc>
- </extension>
+ </extension-->
</plugin>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/model/RobotMLProfile.profile.uml b/extraplugins/robotml/org.eclipse.papyrus.robotml/model/RobotMLProfile.profile.uml
index 66a3a84d3b9..6225a55d903 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/model/RobotMLProfile.profile.uml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/model/RobotMLProfile.profile.uml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_3QOHEPcEEd-J06U5HM_o-Q" name="RobotML" URI="" metaclassReference="_7budMPcPEd-J06U5HM_o-Q _8_Y_UClXEeCiVZQ9o-1H2A _ubL34GAyEeCUQf3vpAG6JA _wuaewGAyEeCUQf3vpAG6JA _6eK1kBtTEeGZBqQLK2tPRA _NIDh0BtUEeGZBqQLK2tPRA _XUmMUBtqEeGZBqQLK2tPRA __HKUgCDmEeGCc9sHkrvZbg _IOXiwCJqEeGXbb453tP0yA _KUx1oCJqEeGXbb453tP0yA _rMqAIEaREeG1RvxKgcDZmw _qZCxkGLPEeGyA8hK1MhgBQ _m0angI6xEeGdCeFFJlx8kA _vy6V0HwtEeKlDbCLaIz6tg _eAAB8Hw6EeKk3aX-P_okJw _qnjTILvGEeKt_61TErRftw _maI6oBlUEeOoKKOJPFGdCw">
+<uml:Profile xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_3QOHEPcEEd-J06U5HM_o-Q" name="RobotML" URI="http://Papyrus/RobotML/1" metaclassReference="_7budMPcPEd-J06U5HM_o-Q _8_Y_UClXEeCiVZQ9o-1H2A _ubL34GAyEeCUQf3vpAG6JA _wuaewGAyEeCUQf3vpAG6JA _6eK1kBtTEeGZBqQLK2tPRA _NIDh0BtUEeGZBqQLK2tPRA _XUmMUBtqEeGZBqQLK2tPRA __HKUgCDmEeGCc9sHkrvZbg _IOXiwCJqEeGXbb453tP0yA _KUx1oCJqEeGXbb453tP0yA _rMqAIEaREeG1RvxKgcDZmw _qZCxkGLPEeGyA8hK1MhgBQ _m0angI6xEeGdCeFFJlx8kA _vy6V0HwtEeKlDbCLaIz6tg _eAAB8Hw6EeKk3aX-P_okJw _qnjTILvGEeKt_61TErRftw _maI6oBlUEeOoKKOJPFGdCw">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VoRqoR4VEeCKot0rXi6qrg" source="http://www.eclipse.org/uml2/2.0.0/UML">
<contents xmi:type="ecore:EPackage" xmi:id="_eC1QcEfCEeOiG_cIEpbzQQ" name="RobotML" nsURI="http:///schemas/RobotML/_ckSO0EfCEeOiG_cIEpbzQQ/1" nsPrefix="RobotML">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eC1QcUfCEeOiG_cIEpbzQQ" source="http://www.eclipse.org/uml2/4.0.0/UML">
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/palettes/Palette_Class_RobotML.xml b/extraplugins/robotml/org.eclipse.papyrus.robotml/palettes/Palette_Class_RobotML.xml
index d437135719e..50e19bacab1 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/palettes/Palette_Class_RobotML.xml
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/palettes/Palette_Class_RobotML.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<paletteDefinition>
<content>
- <drawer iconpath="/icons/drawer.gif" id="Drawer__1323777360776"
+ <drawer iconpath="/icons/drawer.gif" id="org.eclipse.papyrus.robotml.diagram.clazz"
name="RobotML">
<aspectTool description="Create a new Robotic System" id="clazz.tool.system"
name="System" refToolId="clazz.tool.class"
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/style.css b/extraplugins/robotml/org.eclipse.papyrus.robotml/style.css
new file mode 100644
index 00000000000..4b9c1cdf04b
--- /dev/null
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/style.css
@@ -0,0 +1,14 @@
+* {
+ elementIcon:false;
+
+}
+
+Stereotype > Compartment[kind="operation"] {
+ visible:false;
+}
+Class{
+ fontHeight:12;
+}
+Attribute{
+ fontHeight:10;
+}
diff --git a/extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer/META-INF/MANIFEST.MF b/extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer/META-INF/MANIFEST.MF
index 2afb7c89239..1953b25daed 100644
--- a/extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer/META-INF/MANIFEST.MF
+++ b/extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer/META-INF/MANIFEST.MF
@@ -34,4 +34,5 @@ Bundle-Activator: org.eclipse.papyrus.infra.table.modelexplorer.Activa
Bundle-SymbolicName: org.eclipse.papyrus.infra.table.modelexplorer;sin
gleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.eclipse.papyrus.infra.viewpoints.policy
diff --git a/features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature/feature.xml b/features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature/feature.xml
index 653ea9625ef..ffeed9a05b1 100644
--- a/features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature/feature.xml
+++ b/features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature/feature.xml
@@ -31,13 +31,6 @@ http://www.eclipse.org/legal/epl-v10.html
unpack="false"/>
<plugin
- id="org.eclipse.papyrus.robotml.diagram.architecture"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.papyrus.robotml.diagram.common"
download-size="0"
install-size="0"
@@ -45,27 +38,6 @@ http://www.eclipse.org/legal/epl-v10.html
unpack="false"/>
<plugin
- id="org.eclipse.papyrus.robotml.diagram.componentdef"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.robotml.diagram.datatypedef"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.robotml.diagram.interfacedef"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.papyrus.robotml.templaterepository"
download-size="0"
install-size="0"
@@ -120,4 +92,4 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
-</feature>
+</feature> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature/feature.xml
index b1834f34d03..844013e471a 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature/feature.xml
@@ -21,4 +21,6 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.infra.core.sasheditor.di" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.papyrus.infra.core.pluginexplorer" install-size="0" unpack="false" version="0.0.0"/>
+
</feature> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/.project b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/.project
new file mode 100755
index 00000000000..9f6d3376c43
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/build.properties b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/build.properties
new file mode 100755
index 00000000000..140679b2fcb
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ feature.properties,\
+ license.html
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/epl-v10.html b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/epl-v10.html
new file mode 100755
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.properties b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.properties
new file mode 100755
index 00000000000..3d80ed179fc
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.properties
@@ -0,0 +1,133 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+February 1, 2011\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+ 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+ the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+ extending or updating the functionality of an Eclipse-based product.\n\
+ 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+ Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+ 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+ govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+ Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+ with the Specification. Such Installable Software Agreement must inform the user of the\n\
+ terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+ the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+ indication of agreement by the user, the provisioning Technology will complete installation\n\
+ of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.xml
new file mode 100755
index 00000000000..d9b574c1a24
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/feature.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.infra.viewpoints.feature"
+ label="Papyrus Viewpoints (Incubation)"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.configuration"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.configuration.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.configuration.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.doc"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.iso42010"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.iso42010.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.policy"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.viewpoints.preferences"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/license.html b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/license.html
new file mode 100755
index 00000000000..f19c483b9c8
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature/license.html
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>February 1, 2011</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
index 03bfe14d5c5..6b8e6096f1d 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
@@ -155,6 +155,10 @@ http://www.eclipse.org/legal/epl-v10.html
id="org.eclipse.papyrus.emf.facet.feature"
version="0.0.0"/>
+ <includes
+ id="org.eclipse.papyrus.infra.viewpoints.feature"
+ version="0.0.0"/>
+
<plugin
id="com.google.guava"
download-size="0"
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.sources.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.sources.feature/feature.xml
index a526184bdca..4626a8b7bc4 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.sources.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.sources.feature/feature.xml
@@ -51,6 +51,10 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"/>
<includes
+ id="org.eclipse.papyrus.infra.viewpoints.source.feature"
+ version="0.0.0"/>
+
+ <includes
id="org.eclipse.papyrus.infra.widget.source.feature"
version="0.0.0"/>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
index 396469b853b..34a687814db 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature/feature.xml
@@ -59,8 +59,6 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.timing" install-size="0" unpack="false" version="0.0.0"/>
- <plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.pkg" install-size="0" unpack="false" version="0.0.0"/>
-
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.interactionoverview" install-size="0" unpack="false" version="0.0.0"/>
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.symbols" install-size="0" unpack="false" version="0.0.0"/>
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature/feature.xml
index fb57649990f..a3687a69b2a 100644
--- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature/feature.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature/feature.xml
@@ -60,8 +60,6 @@ Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in t
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.usecase.tests" install-size="0" unpack="false" version="0.0.0"/>
- <plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.pkg.tests" install-size="0" unpack="false" version="0.0.0"/>
-
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.deployment.tests" install-size="0" unpack="false" version="0.0.0"/>
<plugin download-size="0" id="org.eclipse.papyrus.uml.diagram.component.tests" install-size="0" unpack="false" version="0.0.0"/>
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java
index 8e02014cde3..5670f3830dc 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/LocalPaletteContentPage.java
@@ -71,7 +71,7 @@ import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.papyrus.customization.palette.proxies.XMLDefinitionPaletteProxyFactory;
+import org.eclipse.papyrus.customization.palette.proxies.XMLPaletteDefinitionProxyFactory;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.Messages;
import org.eclipse.papyrus.uml.diagram.common.part.PaletteUtil;
@@ -79,7 +79,7 @@ import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPalettePreferences;
import org.eclipse.papyrus.uml.diagram.common.service.AspectCreationEntry;
import org.eclipse.papyrus.uml.diagram.common.service.IPapyrusPaletteConstant;
import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.papyrus.uml.diagram.common.service.XMLDefinitionPaletteParser;
+import org.eclipse.papyrus.uml.diagram.common.service.XMLPaletteDefinitionWalker;
import org.eclipse.papyrus.uml.diagram.common.service.palette.IAspectAction;
import org.eclipse.papyrus.uml.diagram.common.service.palette.StereotypeAspectActionProvider;
import org.eclipse.swt.SWT;
@@ -644,12 +644,14 @@ public class LocalPaletteContentPage extends WizardPage implements Listener {
} else {
Document document = documentBuilder.parse(file);
Map<String, PaletteEntry> entries = PaletteUtil.getAvailableEntriesSet(editorPart, ProviderPriority.HIGHEST);
- XMLDefinitionPaletteProxyFactory factory = new XMLDefinitionPaletteProxyFactory(entries);
- XMLDefinitionPaletteParser parser = new XMLDefinitionPaletteParser(factory);
+
+ XMLPaletteDefinitionProxyFactory factory = new XMLPaletteDefinitionProxyFactory(entries);
+ XMLPaletteDefinitionWalker walker = new XMLPaletteDefinitionWalker(factory);
+
for(int i = 0; i < document.getChildNodes().getLength(); i++) {
Node node = document.getChildNodes().item(i);
if(IPapyrusPaletteConstant.PALETTE_DEFINITION.equals(node.getNodeName())) {
- parser.parsePaletteDefinition(node);
+ walker.walk(node);
}
}
contentNode = factory.getRootProxy();
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLDefinitionPaletteProxyFactory.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLPaletteDefinitionProxyFactory.java
index d06ea75e339..ac6c4819534 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLDefinitionPaletteProxyFactory.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/proxies/XMLPaletteDefinitionProxyFactory.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring
*
*****************************************************************************/
@@ -24,16 +25,16 @@ import org.eclipse.papyrus.customization.palette.dialog.PaletteLocalDrawerProxy;
import org.eclipse.papyrus.customization.palette.dialog.PaletteLocalSeparatorProxy;
import org.eclipse.papyrus.customization.palette.dialog.PaletteLocalStackProxy;
import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.service.AbstractXMLDefinitionPaletteFactory;
import org.eclipse.papyrus.uml.diagram.common.service.AspectCreationEntry;
import org.eclipse.papyrus.uml.diagram.common.service.IPapyrusPaletteConstant;
+import org.eclipse.papyrus.uml.diagram.common.service.XMLPaletteDefinitionVisitor;
import org.eclipse.papyrus.uml.diagram.common.service.palette.IPaletteEntryProxy;
import org.w3c.dom.Node;
/**
* Implementation that creates proxies used by the palette previewer in the customiza dialog
*/
-public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPaletteFactory implements IPapyrusPaletteConstant {
+public class XMLPaletteDefinitionProxyFactory implements XMLPaletteDefinitionVisitor, IPapyrusPaletteConstant {
/** map of predefined entries */
protected final Map<String, PaletteEntry> predefinedEntries;
@@ -52,16 +53,26 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
* @param predefinedEntries
* existing predefined entries
*/
- public XMLDefinitionPaletteProxyFactory(Map<String, PaletteEntry> predefinedEntries) {
+ public XMLPaletteDefinitionProxyFactory(Map<String, PaletteEntry> predefinedEntries) {
this.predefinedEntries = predefinedEntries;
registry = new HashMap<Node, IPaletteEntryProxy>();
}
+
+ /**
+ * Returns the parent proxy for the given node
+ *
+ * @param node
+ * the node for which the parent is searched
+ * @return the parent of this node
+ */
+ protected PaletteContainerProxy getParentProxy(Node node) {
+ return (PaletteContainerProxy)registry.get(node.getParentNode());
+ }
/**
* {@inheritDoc}
*/
- @Override
- public void traverseContentNode(Node node) {
+ public void onContent(Node node) {
containerProxy = new PaletteContainerProxy(null);
registry.put(node, containerProxy);
}
@@ -69,8 +80,7 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
/**
* {@inheritDoc}
*/
- @Override
- public void traverseDrawerNode(Node node) {
+ public void onDrawer(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
PaletteContainerProxy proxy;
@@ -80,23 +90,11 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
getParentProxy(node).addChild(proxy);
registry.put(node, proxy);
}
-
- /**
- * Returns the parent proxy for the given node
- *
- * @param node
- * the node for which the parent is searched
- * @return the parent of this node
- */
- protected PaletteContainerProxy getParentProxy(Node node) {
- return (PaletteContainerProxy)registry.get(node.getParentNode());
- }
-
+
/**
* {@inheritDoc}
*/
- @Override
- public void traverseSeparatorNode(Node node) {
+ public void onSeparator(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteLocalSeparatorProxy proxy = new PaletteLocalSeparatorProxy(id);
getParentProxy(node).addChild(proxy);
@@ -107,8 +105,7 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
/**
* {@inheritDoc}
*/
- @Override
- public void traverseStackNode(Node node) {
+ public void onStack(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteLocalStackProxy proxy = new PaletteLocalStackProxy(id);
getParentProxy(node).addChild(proxy);
@@ -118,8 +115,7 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
/**
* {@inheritDoc}
*/
- @Override
- public void traverseToolEntryNode(Node node) {
+ public void onToolEntry(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
PaletteEntryProxy proxy = new PaletteEntryProxy(entry);
@@ -130,8 +126,7 @@ public class XMLDefinitionPaletteProxyFactory extends AbstractXMLDefinitionPalet
/**
* {@inheritDoc}
*/
- @Override
- public void traverseAspectToolEntryNode(Node node) {
+ public void onAspectToolEntry(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/CreateNodeCommand.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/CreateNodeCommand.xpt
index 8182b8c5b9c..aa60a52deed 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/CreateNodeCommand.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/CreateNodeCommand.xpt
@@ -1,196 +1,208 @@
-/*
- * Copyright (c) 2007, 2009 Borland Software Corporation
- *
- * 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:
- * Alexander Shatalin (Borland) - initial API and implementation
- * modified by Patrick Tessier (CEA LIST)
- */
-
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::Utils»
-«EXTENSION xpt::diagram::commands::file»
-«EXTENSION xpt::diagram::commands::NodeConstraintUtils»
-«EXTENSION xpt::OclMigrationProblems»
-
-«DEFINE CreateNodeCommand FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
- «REM» Mutating canvas auxiliary «ENDREM»
- «EXPAND xpt::Common::generatedMemberComment-»
- private org.eclipse.emf.ecore.EClass eClass = null;
- «EXPAND xpt::Common::generatedMemberComment-»
- private org.eclipse.emf.ecore.EObject eObject = null;
- «REM» Mutating canvas auxiliary constructor «ENDREM»
- «EXPAND xpt::Common::generatedMemberComment-»
- public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req, org.eclipse.emf.ecore.EObject eObject) {
- super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
- }
- «REM» Mutating canvas auxiliary builder «ENDREM»
- «EXPAND xpt::Common::generatedMemberComment-»
- public static «createCommandClassName» create(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req, org.eclipse.emf.ecore.EObject eObject) {
- return new «createCommandClassName»(req, eObject);
- }
- «EXPAND _constructor-»
- «EXPAND getElementToEdit-»
- «EXPAND canExecuteMethod-»
- «EXPAND doExecuteWithResultMethod»
- «EXPAND doConfigureMethod»
-}
-«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
- super(req.getLabel(), null, req);
- }
-«ENDDEFINE»
-/*
- * TODO: either use setElementToEdit, or generate downcasted version (which may be troublesome if containment and child features point to a different parent)
- */
-«DEFINE getElementToEdit FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment('FIXME: replace with setElementToEdit()')»
-protected org.eclipse.emf.ecore.EObject getElementToEdit() {
-
- «REM» Mutating canvas helper «ENDREM»
- org.eclipse.emf.ecore.EObject container =
- ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer();
- if (container instanceof org.eclipse.gmf.runtime.notation.View) {
- container = ((org.eclipse.gmf.runtime.notation.View) container).getElement();
- }
- if (container != null) {
- return container;
- }
- return eObject;
-}
-«ENDDEFINE»
-
-«REM» [AbstractElement] Modified for Abstract domain element «ENDREM»
-«DEFINE doExecuteWithResultMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
-«REM» [AbstractElement] START «ENDREM»
-
-«IF modelFacet.metaClass.ecoreClass._abstract <> true-»
-«REM» [AbstractElement] END «ENDREM»
-«IF modelFacet.isPhantomElement()-»
- «EXPAND phantomElementCreation(self, 'newElement') FOR modelFacet»
-«ELSE-»
- «EXPAND normalElementCreation(self, 'newElement') FOR modelFacet»
-«ENDIF»
- «EXPAND initialize(self, 'newElement') FOR modelFacet-»
-«IF true/*FIXME boolean needsExternalConfiguration*/»
- doConfigure(newElement, monitor, info);
-«ENDIF»
- ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass»);
- return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(newElement);
- }
-«REM» [AbstractElement] START «ENDREM»
-«ELSE-»
- throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
- }
-«ENDIF»
-«REM» [AbstractElement] END «ENDREM»
-«ENDDEFINE»
-/*
- * Unlike original CreateElementCommand, we don't keep track of IStatus from configureCommand.execute,
- * nor allow status setting from doDefaultCreation. The reason is ICommandProxy#execute implementation,
- * which ignores any status from wrapped ICommand. Besides, both CommandResult and IStatus seems too much to me.
- */
-«DEFINE doConfigureMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
- org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getElementType();
- org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass», elementType);
- configureRequest.setClientContext(((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getClientContext());
- configureRequest.addParameters(getRequest().getParameters());
- org.eclipse.gmf.runtime.common.core.command.ICommand configureCommand = elementType.getEditCommand(configureRequest);
- if (configureCommand != null && configureCommand.canExecute()) {
- configureCommand.execute(monitor, info);
- }
- }
-«ENDDEFINE»
-«DEFINE canExecuteMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- public boolean canExecute() {
-«IF modelFacet.isPhantomElement()-»
- return true;
-«ELSE-»
- «EXPAND canExecute_Normal FOR modelFacet»
-«ENDIF-»
- }
-«ENDDEFINE»
-«DEFINE canExecute_Normal FOR gmfgen::TypeModelFacet-»
-«IF not containmentMetaFeature.oclIsUndefined()-»
- «IF not containmentMetaFeature.ecoreFeature.oclIsUndefined()-»
- «IF not isUnbounded(containmentMetaFeature.ecoreFeature) or (childMetaFeature <> containmentMetaFeature and not isUnbounded(childMetaFeature.ecoreFeature))-»
- «EXPAND MetaModel::DeclareAndAssign('container', 'getElementToEdit()') FOR containmentMetaFeature.genClass-»
- «IF not isUnbounded(containmentMetaFeature.ecoreFeature)-»
- «IF isSingleValued(containmentMetaFeature.ecoreFeature)»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature» != null) {
- «ELSE-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature».size() >= «containmentMetaFeature.ecoreFeature.upperBound») {
- «ENDIF-»
- return false;
- }
- «ENDIF-»
- «IF childMetaFeature <> containmentMetaFeature and not isUnbounded(childMetaFeature.ecoreFeature)-»
- «IF isSingleValued(childMetaFeature.ecoreFeature)-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature» != null) {
- «ELSE-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature».size() >= «childMetaFeature.ecoreFeature.upperBound») {
- «ENDIF-»
- return false;
- }
- «ENDIF-»
- «ENDIF-»
- «ENDIF-»
-«ENDIF-»
-«REM» [NodeCreationConstraint] START «ENDREM»
-«IF getOwningGenNode().hasNodeCreationConstraint()-»
- «getOwningGenNode().getNodeCreationConstraintBody()-»
-«ELSE-»
-«REM» [NodeCreationConstraint] END «ENDREM»
-return true;
-«REM» [NodeCreationConstraint] START «ENDREM»
-«ENDIF-»
-«REM» [NodeCreationConstraint] END «ENDREM»
-«ENDDEFINE»
-«DEFINE phantomElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
- // Uncomment to put "phantom" objects into the diagram file.
- // org.eclipse.emf.ecore.resource.Resource resource =
- // ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
- // if (resource == null) {
- // return null;
- // }
- org.eclipse.emf.ecore.resource.Resource resource = getElementToEdit().eResource();
- «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
- resource.getContents().add(«EXPAND MetaModel::DowncastToEObject(varName) FOR metaClass»);
-«ENDDEFINE»
-«DEFINE normalElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
- «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
-«IF not containmentMetaFeature.oclIsUndefined()-»
- «EXPAND MetaModel::DeclareAndAssign('owner', 'getElementToEdit()') FOR containmentMetaFeature.genClass»
- «EXPAND MetaModel::modifyFeature('owner', containmentMetaFeature.genClass, varName) FOR containmentMetaFeature-»
-«ELSE-»
- //
- // FIXME no containment feature found in the genmodel, toolsmith need to manually write code here to add «varName» to a parent
- //
-«ENDIF»
-«IF hasExplicitChildFeature(self)-»
- «EXPAND MetaModel::DeclareAndAssign('childHolder', 'getElementToEdit()') FOR childMetaFeature.genClass»
- «EXPAND MetaModel::modifyFeature('childHolder', childMetaFeature.genClass, varName) FOR childMetaFeature»
-«ENDIF-»
-«ENDDEFINE»
+/*
+ * Copyright (c) 2007, 2009 Borland Software Corporation
+ *
+ * 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:
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * modified by Patrick Tessier (CEA LIST)
+ */
+
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::diagram::commands::file»
+«EXTENSION xpt::diagram::commands::NodeConstraintUtils»
+«EXTENSION xpt::OclMigrationProblems»
+
+«DEFINE CreateNodeCommand FOR gmfgen::GenNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editCommandsPackageName»;
+«EXPAND xpt::Common::generatedClassComment»
+public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
+ «REM» Mutating canvas auxiliary «ENDREM»
+ «EXPAND xpt::Common::generatedMemberComment-»
+ private org.eclipse.gmf.runtime.notation.Diagram diagram = null;
+ «EXPAND xpt::Common::generatedMemberComment-»
+ private org.eclipse.emf.ecore.EObject eObject = null;
+ «REM» Mutating canvas auxiliary constructor «ENDREM»
+ «EXPAND xpt::Common::generatedMemberComment-»
+ public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req, org.eclipse.emf.ecore.EObject eObject, org.eclipse.gmf.runtime.notation.Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
+ «REM» Mutating canvas auxiliary builder «ENDREM»
+ «EXPAND xpt::Common::generatedMemberComment-»
+ public static «createCommandClassName» create(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req, org.eclipse.emf.ecore.EObject eObject, org.eclipse.gmf.runtime.notation.Diagram diagram) {
+ return new «createCommandClassName»(req, eObject, diagram);
+ }
+ «EXPAND _constructor-»
+ «EXPAND getElementToEdit-»
+ «EXPAND canExecuteMethod-»
+ «EXPAND doExecuteWithResultMethod»
+ «EXPAND doConfigureMethod»
+}
+«ENDDEFINE»
+«DEFINE _constructor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req, org.eclipse.gmf.runtime.notation.Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+«ENDDEFINE»
+/*
+ * TODO: either use setElementToEdit, or generate downcasted version (which may be troublesome if containment and child features point to a different parent)
+ */
+«DEFINE getElementToEdit FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment('FIXME: replace with setElementToEdit()')»
+protected org.eclipse.emf.ecore.EObject getElementToEdit() {
+
+ «REM» Mutating canvas helper «ENDREM»
+ org.eclipse.emf.ecore.EObject container =
+ ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer();
+ if (container instanceof org.eclipse.gmf.runtime.notation.View) {
+ container = ((org.eclipse.gmf.runtime.notation.View) container).getElement();
+ }
+ if (container != null) {
+ return container;
+ }
+ return eObject;
+}
+«ENDDEFINE»
+
+«REM» [AbstractElement] Modified for Abstract domain element «ENDREM»
+«DEFINE doExecuteWithResultMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
+«REM» [AbstractElement] START «ENDREM»
+
+«IF modelFacet.metaClass.ecoreClass._abstract <> true-»
+«REM» [AbstractElement] END «ENDREM»
+«IF modelFacet.isPhantomElement()-»
+ «EXPAND phantomElementCreation(self, 'newElement') FOR modelFacet»
+«ELSE-»
+ «EXPAND normalElementCreation(self, 'newElement') FOR modelFacet»
+«ENDIF»
+ «EXPAND initialize(self, 'newElement') FOR modelFacet-»
+«IF true/*FIXME boolean needsExternalConfiguration*/»
+ doConfigure(newElement, monitor, info);
+«ENDIF»
+ ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass»);
+ return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(newElement);
+ }
+«REM» [AbstractElement] START «ENDREM»
+«ELSE-»
+ throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
+ }
+«ENDIF»
+«REM» [AbstractElement] END «ENDREM»
+«ENDDEFINE»
+/*
+ * Unlike original CreateElementCommand, we don't keep track of IStatus from configureCommand.execute,
+ * nor allow status setting from doDefaultCreation. The reason is ICommandProxy#execute implementation,
+ * which ignores any status from wrapped ICommand. Besides, both CommandResult and IStatus seems too much to me.
+ */
+«DEFINE doConfigureMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
+ org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getElementType();
+ org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass», elementType);
+ configureRequest.setClientContext(((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ org.eclipse.gmf.runtime.common.core.command.ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if (configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+«ENDDEFINE»
+«DEFINE canExecuteMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public boolean canExecute() {
+«IF modelFacet.isPhantomElement()-»
+ return true;
+«ELSE-»
+ «EXPAND canExecute_Normal FOR modelFacet»
+«ENDIF-»
+ }
+«ENDDEFINE»
+«DEFINE canExecute_Normal FOR gmfgen::TypeModelFacet-»
+
+«IF not containmentMetaFeature.oclIsUndefined()-»
+ «IF not containmentMetaFeature.ecoreFeature.oclIsUndefined()-»
+ «IF not isUnbounded(containmentMetaFeature.ecoreFeature) or (childMetaFeature <> containmentMetaFeature and not isUnbounded(childMetaFeature.ecoreFeature))-»
+ «IF not isUnbounded(containmentMetaFeature.ecoreFeature)-»
+ «EXPAND MetaModel::DeclareAndAssign('container', 'getElementToEdit()') FOR containmentMetaFeature.genClass-»
+ «IF isSingleValued(containmentMetaFeature.ecoreFeature)»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature» != null) {
+ «ELSE-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature».size() >= «containmentMetaFeature.ecoreFeature.upperBound») {
+ «ENDIF-»
+ return false;
+ }
+ «ENDIF-»
+ «IF childMetaFeature <> containmentMetaFeature and not isUnbounded(childMetaFeature.ecoreFeature)-»
+ «IF isSingleValued(childMetaFeature.ecoreFeature)-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature» != null) {
+ «ELSE-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature».size() >= «childMetaFeature.ecoreFeature.upperBound») {
+ «ENDIF-»
+ return false;
+ }
+ «ENDIF-»
+ «ENDIF-»
+ «ENDIF-»
+«ENDIF-»
+
+ org.eclipse.emf.ecore.EObject target = getElementToEdit();
+ org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData data = org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), «EXPAND MetaModel::MetaClass FOR metaClass»);
+ return data.isPermitted();
+«ENDDEFINE»
+
+«DEFINE phantomElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
+ // Uncomment to put "phantom" objects into the diagram file.
+ // org.eclipse.emf.ecore.resource.Resource resource =
+ // ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
+ // if (resource == null) {
+ // return null;
+ // }
+ org.eclipse.emf.ecore.resource.Resource resource = getElementToEdit().eResource();
+ «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
+ resource.getContents().add(«EXPAND MetaModel::DowncastToEObject(varName) FOR metaClass»);
+«ENDDEFINE»
+
+«DEFINE normalElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
+ «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
+ org.eclipse.emf.ecore.EObject target = getElementToEdit();
+ org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData data = org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker.getCurrent().getChildAddData(diagram, target, «varName»);
+ if (data.isPermitted()) {
+ if (data.isPathDefined()) {
+ if (!data.execute(target, «varName»))
+ return org.eclipse.gmf.runtime.common.core.command.CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+«IF not containmentMetaFeature.oclIsUndefined()-»
+ «EXPAND MetaModel::DeclareAndAssign('qualifiedTarget', 'target') FOR containmentMetaFeature.genClass»
+ «EXPAND MetaModel::modifyFeature('qualifiedTarget', containmentMetaFeature.genClass, varName) FOR containmentMetaFeature-»
+«ELSE-»
+ //
+ // FIXME no containment feature found in the genmodel, toolsmith need to manually write code here to add «varName» to a parent
+ //
+«ENDIF»
+ }
+ } else {
+ return org.eclipse.gmf.runtime.common.core.command.CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+
+«IF hasExplicitChildFeature(self)-»
+ «EXPAND MetaModel::DeclareAndAssign('childHolder', 'getElementToEdit()') FOR childMetaFeature.genClass»
+ «EXPAND MetaModel::modifyFeature('childHolder', childMetaFeature.genClass, varName) FOR childMetaFeature»
+«ENDIF-»
+«ENDDEFINE»
«DEFINE initialize(node : gmfgen::GenNode, newElementVar : String) FOR gmfgen::TypeModelFacet»«EXPAND xpt::providers::ElementInitializers::initMethodCall(self, newElementVar) FOR node»«ENDDEFINE»
+
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
index 81ee568ca53..63883132bc2 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
@@ -59,7 +59,7 @@ public class «itemSemanticEditPolicyClassName» extends «getBaseItemSemanticEd
«ENDDEFINE»
«DEFINE childNodeCreateCommand(gmfgen::GenNode node) FOR gmfgen::TypeModelFacet-»
if («node.getDiagram().getElementTypesQualifiedClassName()».«node.getUniqueIdentifier()» == req.getElementType()) {
- return getGEFWrapper(«node.getCreateCommandQualifiedClassName()».create(req, canvasElement));
+ return getGEFWrapper(«node.getCreateCommandQualifiedClassName()».create(req, canvasElement, org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils.getDiagramFrom(getHost())));
}
«ENDDEFINE»
«REM» Mutating canvas Switch to create command «ENDREM»
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/childContainerCreateCommand.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
index 16cf63832b6..cf42cf9558d 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
@@ -57,7 +57,7 @@ if («EXPAND xpt::providers::ElementTypes::accessElementType FOR node» == baseE
«IF papyrusgmfgenextension::GenerateUsingElementTypeCreationCommand.allInstances()->size()>0»
return getGEFWrapper(getSemanticCreationCommand(req));
«ELSE-»
- return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req));
+ return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req, org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils.getDiagramFrom(getHost())));
«ENDIF»
}
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/VisualIDRegistry.xpt b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/VisualIDRegistry.xpt
index 391603667e0..331acf4b3a4 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/VisualIDRegistry.xpt
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/VisualIDRegistry.xpt
@@ -166,10 +166,7 @@ public static int «EXPAND getDiagramVisualIDMethodName»(org.eclipse.emf.ecore.
if (domainElement == null) {
«EXPAND unrecognizedVID-»
}
-«IF null <> domainDiagramElement-»
- «EXPAND returnVisualID-»
-«ENDIF-»
- «EXPAND unrecognizedVID-»
+ return «EXPAND visualID»;
}
«ENDDEFINE»
@@ -491,4 +488,4 @@ return -1;
};
«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/palette/Utils.qvto b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/palette/Utils.qvto
index dc4e936301d..b699f8e7697 100644
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/palette/Utils.qvto
+++ b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/editor/palette/Utils.qvto
@@ -29,7 +29,7 @@ helper gmfgen::ToolGroup::activatorFQN() : String {
}
helper i18nKey(group : gmfgen::EntryBase) : String {
- return let rv = group.createMethodName in (if rv.xpandStartsWith('get') then rv.xpandSubstring(3) else (if rv.xpandStartsWith('create') then rv.xpandSubstring(6) else rv endif) endif)
+ return let rv = group.createMethodName in (if rv.startsWith('get') then rv.xpandSubstring(3) else (if rv.startsWith('create') then rv.xpandSubstring(6) else rv endif) endif)
}
helper i18nTitleKey(group : gmfgen::EntryBase) : String {
@@ -82,4 +82,4 @@ helper getUpperAndUnderscoreString(value:String) : String {
helper getUpper(value:String) : String {
return value.toUpper();
-} \ No newline at end of file
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.classpath b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.classpath
index 8a8f1668cdc..2d1a4302f04 100644..100755
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.classpath
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.project b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project
index 327fed55d77..935d5ed70f1 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.project
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.robotml.diagram.interfacedef</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.core.pluginexplorer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.settings/org.eclipse.jdt.core.prefs
index 2c0e9a14c38..44217f8c068 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,7 @@
-#Mon Feb 07 14:56:33 CET 2011
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..140ef3e5e4c
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.core.pluginexplorer;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.core.pluginexplorer.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Export-Package: org.eclipse.papyrus.infra.core.pluginexplorer
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/about.html b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/about.html
index 82d49bf5f81..dd02e0be168 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/about.html
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/about.html
@@ -8,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>
-<p>June 5, 2007</p>
+<p>December 2, 2009</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
@@ -22,7 +22,7 @@ being redistributed by another party (&quot;Redistributor&quot;) and different t
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/build.properties b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/build.properties
new file mode 100755
index 00000000000..223e2e481f2
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ icons/,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/classf_obj.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/classf_obj.gif
new file mode 100755
index 00000000000..365e3721618
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/classf_obj.gif
Binary files differ
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/file_obj.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/file_obj.gif
new file mode 100755
index 00000000000..7ccc6a70317
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/file_obj.gif
Binary files differ
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/jar_obj.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/jar_obj.gif
new file mode 100755
index 00000000000..2fa1d777bc7
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/jar_obj.gif
Binary files differ
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/packagefolder_obj.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/packagefolder_obj.gif
new file mode 100755
index 00000000000..fca9c53e629
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/packagefolder_obj.gif
Binary files differ
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/plugin_obj.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/plugin_obj.gif
new file mode 100755
index 00000000000..8493df40dfe
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/plugin_obj.gif
Binary files differ
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/sample.gif b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/sample.gif
new file mode 100755
index 00000000000..34fb3c9d8cb
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/icons/sample.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.properties b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.properties
index 5f19d18d0a2..2d32327eb5d 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/plugin.properties
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.properties
@@ -1,12 +1,16 @@
-#################################################################################
-# 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:
-# Saadia dhouib (CEA List) saadia.dhouib@cea.fr - initial API and implementation
-##################################################################################
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = RobotML profile and libraries (Incubation) \ No newline at end of file
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Plugin Explorer (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.xml
new file mode 100755
index 00000000000..8f40342ff2d
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.papyrus.views.category"
+ class="org.eclipse.papyrus.infra.core.pluginexplorer.PluginsContentView"
+ icon="icons/plugin_obj.gif"
+ id="org.eclipse.papyrus.infra.core.pluginexplorer.PluginsContentView"
+ name="Plugin Content Explorer">
+ </view>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/pluginexplorer.pdoc b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/pluginexplorer.pdoc
new file mode 100755
index 00000000000..ca34f5f4af0
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/pluginexplorer.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin gives access to the inner content of Eclipse plugins">
+ <referent firstName="Laurent " lastName="Wouters" eMail="laurent.wouters@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Activator.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Activator.java
new file mode 100755
index 00000000000..a2aad4c02ce
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Activator.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.net.URL;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.core.pluginexplorer"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ // the plugin's context
+ private BundleContext context;
+
+ // The log for this plugin
+ private LogHelper log;
+
+ /**
+ * Gets the context of this plugin
+ * @return The plugin's context
+ */
+ public BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Gets the Papyrus log associated with this plugin
+ * @return The Papyrus log for this plugin
+ */
+ public LogHelper getPapyrusLog() {
+ return log;
+ }
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ this.log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ this.context = context;
+ ImageRegistry registry = getImageRegistry();
+ registry.put("plugin", ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/plugin_obj.gif")));
+ registry.put("folder", ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/packagefolder_obj.gif")));
+ registry.put("class", ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/classf_obj.gif")));
+ registry.put("file", ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/file_obj.gif")));
+ registry.put("jar", ImageDescriptor.createFromURL(new URL("platform:/plugin/" + PLUGIN_ID + "/icons/jar_obj.gif")));
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/EmbeddedFile.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/EmbeddedFile.java
new file mode 100755
index 00000000000..5a384d9a9f0
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/EmbeddedFile.java
@@ -0,0 +1,125 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Represents a file embedded in a Jar container that is a plugin loaded by Eclipse
+ * @author Laurent Wouters
+ */
+public class EmbeddedFile implements PluginEntry {
+ /**
+ * The parent plugin
+ */
+ private Plugin plugin;
+ /**
+ * The relative path to this file within the plugin
+ */
+ private String relativePath;
+ /**
+ * The name of this file
+ */
+ private String name;
+ /**
+ * The children list
+ */
+ private List<PluginEntry> children;
+
+ /**
+ * Gets the Jar entry as a String corresponding to this file
+ * @return The Jar entry for this file as a String
+ */
+ public String getEntry() { return relativePath; }
+
+
+ /**
+ * Creates the representation of a Jar entry as a plugin entry
+ * @param plugin The parent plugin
+ * @param entryName The Jar entry as a String
+ */
+ public EmbeddedFile(Plugin plugin, String entryName) {
+ this.plugin = plugin;
+ this.relativePath = entryName;
+ if (entryName.endsWith("/"))
+ this.relativePath = entryName.substring(0, entryName.length() - 1);
+ this.name = this.relativePath;
+ this.children = new ArrayList<PluginEntry>();
+ }
+
+ /**
+ * Creates the representation of a Jar entry as a plugin entry
+ * @param plugin The parent plugin
+ * @param entryName The Jar entry as a String
+ * @param parentEntry The parent Jar entry as a String
+ */
+ public EmbeddedFile(Plugin plugin, String entryName, String parentEntry) {
+ this.plugin = plugin;
+ this.relativePath = entryName;
+ if (entryName.endsWith("/"))
+ this.relativePath = entryName.substring(0, entryName.length() - 1);
+ this.name = relativePath.substring(parentEntry.length() + 1);
+ this.children = new ArrayList<PluginEntry>();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getPlugin()
+ */
+ public Plugin getPlugin() { return plugin; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getName()
+ */
+ public String getName() { return name; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getLogicalPath()
+ */
+ public String getLogicalPath() { return "platform:/plugin/" + plugin.getName() + "/" + relativePath; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getPhysicalPath()
+ */
+ public String getPhysicalPath() { return null; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#hasChildren()
+ */
+ public boolean hasChildren() { return (!children.isEmpty()); }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#children()
+ */
+ public List<PluginEntry> children() { return children; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getChild(java.lang.String)
+ */
+ public PluginEntry getChild(String name) {
+ for (PluginEntry entry : children)
+ if (entry.getName().equals(name))
+ return entry;
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getInputStream()
+ */
+ public InputStream getInputStream() {
+ return plugin.getStreamInJar(relativePath);
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PhysicalFile.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PhysicalFile.java
new file mode 100755
index 00000000000..83defc3ba87
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PhysicalFile.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * Represents a physical file (on disk) as a resource within a plugin
+ * @author Laurent Wouters
+ */
+public class PhysicalFile implements PluginEntry {
+ /**
+ * A constant empty list of entries
+ */
+ private static final List<PluginEntry> empty = new ArrayList<PluginEntry>(0);
+
+ /**
+ * The parent plugin
+ */
+ private Plugin plugin;
+ /**
+ * The physical file represented by this object
+ */
+ private File file;
+ /**
+ * The cache of children
+ */
+ private List<PluginEntry> cache;
+
+ /**
+ * Creates the representation of a physical file as a plugin entry
+ * @param plugin The parent plugin
+ * @param file The represented physical file
+ */
+ public PhysicalFile(Plugin plugin, File file) {
+ this.plugin = plugin;
+ this.file = file;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getPlugin()
+ */
+ public Plugin getPlugin() { return plugin; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getName()
+ */
+ public String getName() { return file.getName(); }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getLogicalPath()
+ */
+ public String getLogicalPath() {
+ IPath pp = new Path(plugin.getPhysicalPath());
+ IPath physical = new Path(file.getAbsolutePath());
+ return "platform:/plugin/" + plugin.getName() + "/" + physical.makeRelativeTo(pp).toString();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getPhysicalPath()
+ */
+ public String getPhysicalPath() { return file.getAbsolutePath(); }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#hasChildren()
+ */
+ public boolean hasChildren() {
+ if (file.isDirectory()) {
+ File[] content = file.listFiles();
+ return (content != null && content.length > 0);
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#children()
+ */
+ public List<PluginEntry> children() {
+ if (cache != null)
+ return cache;
+ if (!file.isDirectory()) {
+ cache = empty;
+ return empty;
+ }
+ buildCache();
+ return cache;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getChild(java.lang.String)
+ */
+ public PluginEntry getChild(String name) {
+ if (cache == null)
+ buildCache();
+ for (PluginEntry entry : cache)
+ if (entry.getName().equals(name))
+ return entry;
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry#getInputStream()
+ */
+ public InputStream getInputStream() {
+ try {
+ return new FileInputStream(file);
+ } catch (FileNotFoundException e) {
+ // Cannot happen, unless the file has been deleted after the lookup
+ // in which case, too bad
+ return null;
+ }
+ }
+
+ /**
+ * Builds the cache of children entries
+ */
+ private void buildCache() {
+ File[] content = file.listFiles();
+ if (content == null || content.length == 0) {
+ cache = empty;
+ } else {
+ cache = new ArrayList<PluginEntry>(content.length);
+ for (int i=0; i!=content.length; i++)
+ cache.add(new PhysicalFile(plugin, content[i]));
+ }
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Plugin.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Plugin.java
new file mode 100755
index 00000000000..87165ce0428
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/Plugin.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.osgi.framework.Bundle;
+
+/**
+ * Represents an Eclipse plugin that can be introspected
+ * @author Laurent Wouters
+ */
+public class Plugin {
+
+ /**
+ * Gets an array of all the currently loaded plugins
+ * @return The currently loaded plugins
+ */
+ public static Plugin[] getLoadedPlugins() {
+ Bundle[] loaded = Activator.getDefault().getContext().getBundles();
+ Plugin[] plugins = new Plugin[loaded.length];
+ for (int i=0; i!=loaded.length; i++)
+ plugins[i] = new Plugin(loaded[i]);
+ return plugins;
+ }
+
+ /**
+ * The Eclipse bundle represented by this object
+ */
+ private Bundle bundle;
+ /**
+ * The list of entries at the plugin's root
+ */
+ private List<PluginEntry> entries;
+ /**
+ * The physical file represented by this object.
+ * It may be a jar file, or a folder.
+ */
+ private File physicalLocation;
+
+ /**
+ * Gets the corresponding Eclipse bundle
+ * @return The Eclipse bundle represented by this object
+ */
+ public Bundle getBundle() { return bundle; }
+
+ /**
+ * Gets whether this plugin contains resources
+ * @return <code>true</code> if this plugin contains resources
+ */
+ public boolean hasEntries() { return (!entries.isEmpty()); }
+
+ /**
+ * Gets the top entries within this plugin
+ * @return The top entries
+ */
+ public List<PluginEntry> entries() { return entries; }
+
+ /**
+ * Gets the qualified name of this plugin.
+ * This is the symbolic name of the represented bundle
+ * @return The plugin's name
+ */
+ public String getName() { return bundle.getSymbolicName(); }
+
+ /**
+ * Initializes this plugin with the given Eclipse bundle
+ * @param bundle The Eclipse bundle to represent
+ */
+ public Plugin(Bundle bundle) {
+ this.bundle = bundle;
+ this.entries = new ArrayList<PluginEntry>();
+ try { physicalLocation = FileLocator.getBundleFile(bundle); }
+ catch (IOException e) {
+ Activator.getDefault().getPapyrusLog().error("Failed to locate the plugin " + bundle.getSymbolicName(), e);
+ }
+ if (physicalLocation == null)
+ return;
+ if (physicalLocation.isDirectory())
+ buildFromDirectory();
+ else
+ buildFromJar();
+ }
+
+ /**
+ * Gets the absolute physical path to this plugin
+ * @return The absolute path to this plugin
+ */
+ public String getPhysicalPath() {
+ if (physicalLocation == null)
+ return null;
+ return physicalLocation.getAbsolutePath();
+ }
+
+ /**
+ * Gets the entry corresponding to the given path, or <code>null</code> if none is found.
+ * Paths shall be of the form <code>part1/part2/part3</code>, etc.
+ * @param path The path to lookup for an entry
+ * @return The corresponding entry or <code>null</code> if none is found
+ */
+ public PluginEntry getEntry(String path) {
+ // sanitize
+ int start = (path.startsWith("/") ? 1 : 0);
+ int end = (path.endsWith("/") ? path.length() - 1 : path.length());
+ path = path.substring(start, end);
+ // split into the path elements
+ String[] parts = path.split("/");
+ PluginEntry current = null;
+ for (PluginEntry e : entries) {
+ if (e.getName().equals(parts[0])) {
+ current = e;
+ break;
+ }
+ }
+ if (current == null)
+ return null;
+ for (int i=1; i!=parts.length; i++) {
+ current = current.getChild(parts[i]);
+ if (current == null)
+ return null;
+ }
+ return current;
+ }
+
+ /**
+ * Builds this plugin from a physical directory
+ */
+ private void buildFromDirectory() {
+ File[] content = physicalLocation.listFiles();
+ if (content == null || content.length == 0)
+ return;
+ for (int i=0; i!=content.length; i++)
+ entries.add(new PhysicalFile(this, content[i]));
+ }
+
+ /**
+ * Builds this plugin from a Jar file
+ */
+ private void buildFromJar() {
+ try {
+ JarFile jar = new JarFile(physicalLocation);
+ List<JarEntry> content = new ArrayList<JarEntry>();
+ Enumeration<JarEntry> e = jar.entries();
+ while (e.hasMoreElements())
+ content.add(e.nextElement());
+ Collections.sort(content, new Comparator<JarEntry>() {
+ public int compare(JarEntry arg0, JarEntry arg1) {
+ return arg0.getName().compareTo(arg1.getName());
+ }
+ });
+ int next = 0;
+ while (next < content.size()) {
+ EmbeddedFile child = new EmbeddedFile(this, content.get(next).getName());
+ next = buildChildren(child, content, next + 1);
+ entries.add(child);
+ }
+ jar.close();
+ }
+ catch (IOException e) { }
+ }
+
+ /**
+ * Builds the given embedded file with the given data
+ * @param parent The parent embedded directory
+ * @param content The sorted list of all the jar entries
+ * @param index The current index in the list of jar entries
+ * @return The final index within the jar entries
+ */
+ private int buildChildren(EmbeddedFile parent, List<JarEntry> content, int index) {
+ if (index >= content.size())
+ return index;
+ int next = index;
+ while (next < content.size() && content.get(next).getName().startsWith(parent.getEntry())) {
+ EmbeddedFile child = new EmbeddedFile(this, content.get(next).getName(), parent.getEntry());
+ next = buildChildren(child, content, next + 1);
+ parent.children().add(child);
+ }
+ return next;
+ }
+
+ InputStream getStreamInJar(String localPath) {
+ try {
+ final JarFile jar = new JarFile(physicalLocation);
+ final JarEntry entry = jar.getJarEntry(localPath);
+ return new InputStream() {
+ private InputStream inner = jar.getInputStream(entry);
+ @Override
+ public int read() throws IOException {
+ return inner.read();
+ }
+ @Override
+ public void close() {
+ try {
+ inner.close();
+ jar.close();
+ }
+ catch (IOException e) { }
+ }
+ };
+ }
+ catch (IOException e) {
+ return null;
+ }
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginEntry.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginEntry.java
new file mode 100755
index 00000000000..3c7bf7556ff
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginEntry.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.io.InputStream;
+import java.util.List;
+
+
+/**
+ * Represents a resource within a plugin
+ * @author Laurent Wouters
+ */
+public interface PluginEntry {
+ /**
+ * Gets the parent plugin
+ * @return The parent plugin
+ */
+ Plugin getPlugin();
+
+ /**
+ * Gets the name of this entry
+ * @return The simple name of this entry
+ */
+ String getName();
+
+ /**
+ * Gets the String representation of the URI that can be used to access this resource.
+ * The returned URI is always prefixed by the <code>platform:/plugin/</code> scheme.
+ * @return The logical path to this entry
+ */
+ String getLogicalPath();
+
+ /**
+ * Gets the String representation of the physical path to the file represented by this entry.
+ * This path only exists for files already on disk, for embedded files this method should return <code>null</null>.
+ * @return The physical absolute path to the file
+ */
+ String getPhysicalPath();
+
+ /**
+ * Gets whether this entry has children (sub-entries), in which case this entry is a directory.
+ * @return <code>true</code> if this entry contains sub-entries
+ */
+ boolean hasChildren();
+
+ /**
+ * Gets the children of this entry (sub-entries)
+ * @return The children entries
+ */
+ List<PluginEntry> children();
+
+ /**
+ * Gets the child of this entry with the given name, or null if none is found
+ * @param name The name to lookup for
+ * @return The child entry with the given name
+ */
+ PluginEntry getChild(String name);
+
+ /**
+ * Gets an input stream on the resource represented by this entry
+ * @return An input stream on the resource
+ */
+ InputStream getInputStream();
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentDialog.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentDialog.java
new file mode 100755
index 00000000000..f5d6ddb4375
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentDialog.java
@@ -0,0 +1,182 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SegmentEvent;
+import org.eclipse.swt.events.SegmentListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+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.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.osgi.framework.Bundle;
+
+/**
+ * Represents a dialog for the selection of plugins and their resources by a user
+ * @author Laurent Wouters
+ */
+public class PluginsContentDialog extends Dialog {
+ private static final int SIZE_WIDTH = 400;
+ private static final int SIZE_HEIGHT = 300;
+
+ private PluginsContentSelectionValidator validator;
+ private String title;
+ private String message;
+ private Plugin[] plugins;
+ private TreeViewer tree;
+ private Text field;
+ private Object selection;
+
+ /**
+ * Gets the selected element
+ * @return The element selected by the user
+ */
+ public Object getSelection() {
+ return selection;
+ }
+
+ /**
+ * Creates a new dialog
+ * @param parentShell The parent shell
+ * @param validator The validator used for validating the user's selection
+ * @param title The dialog's title
+ * @param message The dialog's message
+ */
+ public PluginsContentDialog(Shell parentShell, PluginsContentSelectionValidator validator, String title, String message) {
+ super(parentShell);
+ this.validator = validator;
+ this.title = title;
+ this.message = message;
+ this.plugins = Plugin.getLoadedPlugins();
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ composite.setLayout(gridLayout);
+
+ Label label = new Label(composite, SWT.WRAP | SWT.SINGLE);
+ label.setText(message);
+ label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+
+ field = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ field.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+ field.addSegmentListener(new SegmentListener(){
+ public void getSegments(SegmentEvent event) {
+ if (tree != null)
+ tree.setContentProvider(new PluginsContentProvider(plugins, field.getText()));
+ }
+ });
+
+ Composite inner = new Composite(composite, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
+ inner.setLayout(new FillLayout());
+
+ tree = new TreeViewer(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree.setLabelProvider(new PluginsContentLabelProvider());
+ tree.setSorter(getViewerSorter());
+ tree.setContentProvider(new PluginsContentProvider(plugins, null));
+ tree.setInput(PluginsContentProvider.treeRoot);
+ tree.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection s = (IStructuredSelection)event.getSelection();
+ selection = s.getFirstElement();
+ resetValidity();
+ }
+ });
+
+ applyDialogFont(composite);
+ return composite;
+ }
+
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control composite = super.createButtonBar(parent);
+ resetValidity();
+ return composite;
+ }
+
+ /**
+ * Enquires about the current validity of the selection and disables or enables the dialog's validation correspondingly
+ */
+ private void resetValidity() {
+ if (selection == null) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ return;
+ }
+ if (validator == null) {
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ return;
+ }
+ boolean valid = false;
+ if (selection instanceof Plugin)
+ valid = validator.isValid((Plugin)selection);
+ else if (selection instanceof PluginEntry)
+ valid = validator.isValid((PluginEntry)selection);
+ getButton(IDialogConstants.OK_ID).setEnabled(valid);
+ }
+
+ @Override
+ protected boolean isResizable() { return true; }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setSize(SIZE_WIDTH, SIZE_HEIGHT);
+ Point size = shell.getParent().getShell().getSize();
+ shell.setLocation((size.x - SIZE_WIDTH)/2, (size.y - SIZE_HEIGHT)/2);
+ shell.setText(title);
+ }
+
+ /**
+ * Gets the viewer sorter for this dialog
+ * @return A viewer sorter
+ */
+ private ViewerSorter getViewerSorter() {
+ return new ViewerSorter() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (e1 instanceof Bundle) {
+ Bundle b1 = (Bundle)e1;
+ Bundle b2 = (Bundle)e2;
+ return b1.getSymbolicName().compareTo(b2.getSymbolicName());
+ } else if (e1 instanceof File) {
+ File f1 = (File)e1;
+ File f2 = (File)e2;
+ return (f1.getName().compareTo(f2.getName()));
+ }
+ return super.compare(viewer, e1, e2);
+ }
+ };
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentLabelProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentLabelProvider.java
new file mode 100755
index 00000000000..8161504028f
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentLabelProvider.java
@@ -0,0 +1,33 @@
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class PluginsContentLabelProvider extends LabelProvider {
+ @Override
+ public Image getImage(Object element) {
+ ImageRegistry registry = Activator.getDefault().getImageRegistry();
+ if (element instanceof Plugin) {
+ return registry.get("plugin");
+ } else if (element instanceof PluginEntry) {
+ if (((PluginEntry) element).hasChildren())
+ return registry.get("folder");
+ String name = ((PluginEntry) element).getName();
+ if (name.endsWith(".class"))
+ return registry.get("class");
+ else if (name.endsWith(".jar"))
+ return registry.get("jar");
+ }
+ return registry.get("file");
+ }
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Plugin) {
+ return ((Plugin)element).getName();
+ } else if (element instanceof PluginEntry) {
+ return ((PluginEntry)element).getName();
+ }
+ return element.toString();
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentProvider.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentProvider.java
new file mode 100755
index 00000000000..84ef2271d6e
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentProvider.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * Represents a provider of plugins their content
+ * @author Laurent Wouters
+ */
+public class PluginsContentProvider implements ITreeContentProvider {
+
+ /**
+ * The root of all plugins
+ */
+ public static final Object treeRoot = new Object();
+
+ /**
+ * The unfiltered list of loaded plugins
+ */
+ private Plugin[] plugins;
+ /**
+ * The current filter
+ */
+ private String filter;
+
+ /**
+ * Creates the provider with the given filter on plugins' names
+ * @param plugins The plugins to provide
+ * @param filter The filter used on plugins' names
+ */
+ public PluginsContentProvider(Plugin[] plugins, String filter) {
+ this.plugins = plugins;
+ this.filter = filter;
+ if (this.filter != null && this.filter.isEmpty())
+ this.filter = null;
+ }
+
+ /**
+ * Gets the plugins to provide after the application of the filter
+ * @return The plugins to provide
+ */
+ private Object[] getFilteredPlugins() {
+ if (filter == null)
+ return plugins;
+ List<Plugin> list = new ArrayList<Plugin>();
+ for (int i=0; i!=plugins.length; i++) {
+ String name = plugins[i].getName();
+ if (name.contains(filter))
+ list.add(plugins[i]);
+ }
+ return list.toArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() { }
+
+ /* (non-Javadoc)
+ * @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) { }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return getFilteredPlugins();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object element) {
+ if (element == treeRoot)
+ return getFilteredPlugins();
+ if (element instanceof Plugin)
+ return ((Plugin)element).entries().toArray();
+ else if (element instanceof PluginEntry)
+ return ((PluginEntry)element).children().toArray();
+ return new Object[0];
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element == treeRoot)
+ return null;
+ if (element instanceof Plugin)
+ return treeRoot;
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ if (element == treeRoot)
+ return true;
+ if (element instanceof Plugin)
+ return ((Plugin)element).hasEntries();
+ else if (element instanceof PluginEntry)
+ return ((PluginEntry)element).hasChildren();
+ return false;
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentSelectionValidator.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentSelectionValidator.java
new file mode 100755
index 00000000000..9b90f2958e1
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentSelectionValidator.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+/**
+ * Validates the selection of a resource in a plugin
+ * @author Laurent Wouters
+ */
+public interface PluginsContentSelectionValidator {
+ /**
+ * Determines whether the given plugin is a valid selection
+ * @param plugin The plugin
+ * @return <code>true</code> if the plugin is a valid selection
+ */
+ boolean isValid(Plugin plugin);
+ /**
+ * Determines whether the given plugin entry is a valid selection
+ * @param entry The plugin entry
+ * @return <code>true</code> if the plugin entry is a valid selection
+ */
+ boolean isValid(PluginEntry entry);
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentView.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentView.java
new file mode 100755
index 00000000000..fc1a76362da
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer/src/org/eclipse/papyrus/infra/core/pluginexplorer/PluginsContentView.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.pluginexplorer;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
+import java.io.File;
+
+import org.eclipse.jface.action.AbstractAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuCreator;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.HelpListener;
+import org.eclipse.swt.events.SegmentEvent;
+import org.eclipse.swt.events.SegmentListener;
+import org.eclipse.swt.layout.FillLayout;
+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.Menu;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.part.ViewPart;
+import org.osgi.framework.Bundle;
+
+/**
+ * This represents an Eclipse View displaying reflective information about the loaded Eclipse plugins
+ * @author Laurent Wouters
+ */
+public class PluginsContentView extends ViewPart {
+
+ /**
+ * The ID of the view as specified by the extension.
+ */
+ public static final String ID = "org.eclipse.papyrus.infra.core.pluginexplorer.PluginReflectorView";
+
+ private Plugin[] plugins;
+ private TreeViewer tree;
+ private Text field;
+
+ /**
+ * Initializes this view
+ */
+ public PluginsContentView() {
+ this.plugins = Plugin.getLoadedPlugins();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite parent) {
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ parent.setLayout(gridLayout);
+
+ field = new Text(parent, SWT.SINGLE | SWT.BORDER);
+ field.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+ field.addSegmentListener(new SegmentListener(){
+ public void getSegments(SegmentEvent event) {
+ if (tree != null)
+ tree.setContentProvider(new PluginsContentProvider(plugins, field.getText()));
+ }
+ });
+
+ Composite inner = new Composite(parent, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
+ inner.setLayout(new FillLayout());
+
+ tree = new TreeViewer(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree.setLabelProvider(new PluginsContentLabelProvider());
+ tree.setSorter(getViewerSorter());
+ tree.setContentProvider(new PluginsContentProvider(plugins, null));
+ tree.setInput(PluginsContentProvider.treeRoot);
+ tree.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ if(event.getSelection() instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection)event.getSelection();
+ Object obj = selection.getFirstElement();
+
+ MenuManager menuMgr = new MenuManager();
+ Menu menu = menuMgr.createContextMenu(tree.getControl());
+ tree.getControl().setMenu(menu);
+ getSite().registerContextMenu(menuMgr, tree);
+
+ if (obj instanceof PluginEntry)
+ fillMenuFor((PluginEntry)obj, menuMgr);
+ }
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ field.setFocus();
+ }
+
+ /**
+ * Gets the viewer sorter for this dialog
+ * @return A viewer sorter
+ */
+ private ViewerSorter getViewerSorter() {
+ return new ViewerSorter() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (e1 instanceof Bundle) {
+ Bundle b1 = (Bundle)e1;
+ Bundle b2 = (Bundle)e2;
+ return b1.getSymbolicName().compareTo(b2.getSymbolicName());
+ } else if (e1 instanceof File) {
+ File f1 = (File)e1;
+ File f2 = (File)e2;
+ return (f1.getName().compareTo(f2.getName()));
+ }
+ return super.compare(viewer, e1, e2);
+ }
+ };
+ }
+
+ private void fillMenuFor(final PluginEntry entry, MenuManager menu) {
+ menu.add(new org.eclipse.jface.action.Action("Copy URI to clipboard") {
+ @Override
+ public void run() {
+ StringSelection transferable = new StringSelection(entry.getLogicalPath());
+ Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ clipboard.setContents(transferable, null);
+ }
+ });
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
index c8f2154ede7..385a581b8bf 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
org.eclipse.gmf.runtime.notation.edit;bundle-version="1.7.0",
org.w3c.dom.svg;bundle-version="1.1.0"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.css,
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
index 28183752898..62f2a628285 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/notation/CSSDiagramImpl.java
@@ -28,6 +28,11 @@ import org.eclipse.papyrus.infra.gmfdiag.css.engine.DiagramCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.engine.ExtendedCSSEngine;
import org.eclipse.papyrus.infra.gmfdiag.css.resource.CSSNotationResource;
import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheet;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StyleSheetReference;
+import org.eclipse.papyrus.infra.gmfdiag.css.stylesheets.StylesheetsFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
* Default implementation for CSSDiagram
@@ -84,9 +89,31 @@ public class CSSDiagramImpl extends DiagramImpl implements CSSDiagram {
}
}
+ StyleSheet s = getViewpointDefinedStylesheet();
+ if (s != null)
+ result.add(s);
+
return result;
}
+ private StyleSheet getViewpointDefinedStylesheet() {
+ ViewPrototype proto = ViewPrototype.get(this);
+ if (proto == null) {
+ return null;
+ }
+ PapyrusView conf = proto.getConfiguration();
+ if (conf == null || !(conf instanceof PapyrusDiagram)) {
+ return null;
+ }
+ String path = ((PapyrusDiagram) conf).getCustomStyle();
+ if (path == null || path.isEmpty()) {
+ return null;
+ }
+ StyleSheetReference ref = StylesheetsFactory.eINSTANCE.createStyleSheetReference();
+ ref.setPath(path);
+ return ref;
+ }
+
private class DiagramDisposeListener extends AdapterImpl {
@Override
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
index 8870a72c112..493e7348a61 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/META-INF/MANIFEST.MF
@@ -13,6 +13,7 @@ Require-Bundle: org.eclipse.ui.workbench,
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
org.eclipse.core.expressions;bundle-version="3.4.500",
org.eclipse.gmf.runtime.diagram.ui.resources.editor
Bundle-Vendor: %providerName
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
index cf4e726d3f5..532f4ebe38b 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands/src/org/eclipse/papyrus/commands/ICreationCommand.java
@@ -12,7 +12,10 @@ package org.eclipse.papyrus.commands;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
* Define a command use to create new diagram. It use to provide Eclipse
@@ -24,33 +27,66 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet;
public interface ICreationCommand {
/**
- * Create a new diagram in diResourceSet with the given name and open it.
+ * Create a diagram.
+ * This method will try to find an adequate view for the passed arguments
*
* @param modelSet
- * the resourceSet containing all diagrams
- * @param container
- * of the diagram, if container is null, the diagram is contained
- * by the top level container
- * @param diagramName
- * the name of the new diagram or null to use a dialog to choose
- * the name
+ * the current model set
+ * @param owner
+ * the diagram's owner and root element
+ * @param name
+ * the diagram's name
+ * @return the created diagram, or <code>null</code> if the creation failed
*/
- public void createDiagram(ModelSet modelSet, EObject container, String diagramName);
+ public Diagram createDiagram(ModelSet modelSet, EObject owner, String name);
/**
- * Get a command to create a new diagram in diResourceSet with the given
- * name.
+ * Create a diagram.
*
* @param modelSet
- * the resourceSet containing all diagrams
- * @param container
- * of the diagram, if container is null, the diagram is contained
- * by the top level container
- * @param diagramName
- * the name of the new diagram or null to use a dialog to choose
- * the name
+ * the current model set
+ * @param owner
+ * the diagram's owner
+ * @param element
+ * the diagram's model element
+ * @param prototype
+ * the diagram's prototype
+ * @param name
+ * the diagram's name
+ * @return the created diagram, or <code>null</code> if the creation failed
*/
- public ICommand getCreateDiagramCommand(final ModelSet modelSet, final EObject container, final String diagramName);
+ public Diagram createDiagram(ModelSet modelSet, EObject owner, EObject element, ViewPrototype prototype, String name);
+
+ /**
+ * Gets the GMF command for the diagram creation
+ * This method will try to find an adequate view for the passed arguments
+ *
+ * @param modelSet
+ * the current model set
+ * @param owner
+ * the diagram's owner and root element
+ * @param name
+ * the diagram's name
+ * @return the created diagram, or <code>null</code> if the creation failed
+ */
+ public ICommand getCreateDiagramCommand(ModelSet modelSet, EObject owner, String name);
+
+ /**
+ * Gets the GMF command for the diagram creation
+ *
+ * @param modelSet
+ * the current model set
+ * @param owner
+ * the diagram's owner
+ * @param element
+ * the diagram's model element
+ * @param prototype
+ * the diagram's prototype
+ * @param name
+ * the diagram's name
+ * @return the created diagram, or <code>null</code> if the creation failed
+ */
+ public ICommand getCreateDiagramCommand(ModelSet modelSet, EObject owner, EObject element, ViewPrototype prototype, String name);
/**
* Get the type of the diagram to create.
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
index 2df85a9ff59..5d782327186 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF
@@ -55,6 +55,8 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
org.eclipse.papyrus.infra.services.decoration;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
org.eclipse.papyrus.uml.tools
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
index 2d220dd6389..9ed75968eea 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/plugin.xml
@@ -7,8 +7,8 @@
<extension-point id="shapeProvider" name="ShapeProvider" schema="schema/shapeProvider.exsd"/>
<extension-point id="notationTypesMapping" name="notationTypesMapping" schema="schema/notationTypesMapping.exsd"/>
<extension-point id="svgPostProcessors" name="svgPostProcessors" schema="schema/svgPostProcessors.exsd"/>
- <extension-point id="pasteCommandProvider" name="pasteCommandProvider" schema="schema/pasteCommandProvider.exsd"/>
-
+ <extension-point id="pasteCommandProvider" name="pasteCommandProvider" schema="schema/pasteCommandProvider.exsd"/>
+
<extension
point="org.eclipse.ui.handlers">
<handler
@@ -148,6 +148,27 @@
</binding>
</extension>
<extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel
+ nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation">
+ <metamodelType
+ eclass="Diagram"
+ edithelper="org.eclipse.papyrus.infra.gmfdiag.common.helper.DiagramEditHelper"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.DiagramElementType"
+ name="Diagram">
+ </metamodelType>
+ </metamodel>
+</extension>
+<extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <binding
+ context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType
+ ref="org.eclipse.papyrus.infra.gmfdiag.common.DiagramElementType">
+ </elementType>
+ </binding>
+</extension>
+<extension
point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
class="org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramPropertyTester"
@@ -163,6 +184,76 @@
properties="isGmfDiagramContextActive"
type="java.util.Collection">
</propertyTester>
+</extension>
+<extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
+ <dynamic
+ class="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution">
+ </dynamic>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="menu:org.eclipse.papyrus.ui.menu">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif"
+ id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
+ label="New Diagram">
+ <dynamic
+ class="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution">
+ </dynamic>
+ </menu>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar">
+ <command
+ commandId="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.diagrams.command"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif"
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.diagrams"
+ label="Create a new diagram ..."
+ style="pulldown"
+ tooltip="Create a new diagram ...">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </toolbar>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="menu:org.eclipse.papyrus.infra.viewpoints.policy.toolbar.diagrams">
+ <dynamic
+ class="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution"
+ id="org.eclipse.papyrus.infra.gmfdiag.common.handler.DynamicDiagramsMenuContribution">
+ </dynamic>
+ </menuContribution>
+</extension>
+<extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.infra.viewpoints.policy.commands"
+ defaultHandler="org.eclipse.papyrus.infra.viewpoints.policy.DynamicCommandHandler"
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.diagrams.command"
+ name="Create Dynamic Diagram Command">
+ </command>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.viewType">
+ <helper
+ class="org.eclipse.papyrus.infra.gmfdiag.common.helper.GMFDiagramViewTypeHelper">
+ </helper>
</extension>
<extension
point="org.eclipse.papyrus.infra.gmfdiag.common.shapeProvider">
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
index 103b1eb5ee7..6ebafce763c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/AbstractPapyrusGmfCreateDiagramCommandHandler.java
@@ -1,382 +1,411 @@
-/*****************************************************************************
- * Copyright (c) 2008, 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:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - only calculate affected files for workspace resources (CDO)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.commands.OpenDiagramCommand;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-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.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Command creating a new GMF diagram in Papyrus. This command is intended to be used in eclipse
- * extensions.
- *
- * Commands to create a GMF Diagram can subclass this class. There is two kinds of commands: -
- * Eclipse handlers issuing commands (toolbar, menu, ...). This commands can find the active editor
- * by using the Worbench.getActivePArt(). The entry point is {@link #execute(ExecutionEvent)}. -
- * Commands called during editor initializing (like wizard). This commands require the diResourceSet
- * to work. The entry point is {@link #createDiagram(DiResourceSet, EObject, String)}
- *
- * @author cedric dumoulin
- * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
- */
-public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends AbstractHandler implements IHandler, ICreationCommand {
-
- /**
- * Method called when the command is invoked.
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- ServicesRegistry registry;
- try {
- registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
- } catch (ServiceException ex) {
- throw new ExecutionException("Cannot retrieve the ServicesRegistry", ex);
- }
-
- EObject container = null;
- // if editor is open and active
- container = getSelectedElement();
- runAsTransaction(container, registry);
- return null;
- }
-
- /**
- * Create a new class diagram
- *
- * @param sharedObjects
- * @param container
- * The uml element to which the diagram should be attached, if possible.
- * @throws ExecutionException
- */
- protected void runAsTransaction(EObject container, ServicesRegistry registry) throws ExecutionException {
-
- ModelSet modelSet;
- try {
- modelSet = registry.getService(ModelSet.class);
- } catch (ServiceException e) {
- throw new ExecutionException("Can't get ModelSet", e);
- }
-
- runAsTransaction(modelSet, container, null);
- }
-
- /**
- * Create a new gmf diagram
- *
- * @param sharedObjects
- * @param container
- * The eObject to which the diagram should be attached, if possible.
- */
- protected void runAsTransaction(final ModelSet modelSet, final EObject container, String name) {
- TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
- CompositeCommand cmd = new CompositeCommand("Create diagram");
- ICommand createCmd = getCreateDiagramCommand(modelSet, container, name);
- cmd.add(createCmd);
- cmd.add(new OpenDiagramCommand(dom, createCmd));
-
- dom.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
- }
-
- /**
- * Get the root element associated with canvas.
- */
- protected EObject getRootElement(Resource modelResource) {
- EObject rootElement = null;
- if(modelResource != null && modelResource.getContents() != null && modelResource.getContents().size() > 0) {
- Object root = modelResource.getContents().get(0);
- if(root instanceof EObject) {
- rootElement = (EObject)root;
- }
- }
-
- return rootElement;
- }
-
- /**
- * Store model element in the resource.
- */
- protected void attachModelToResource(EObject root, Resource resource) {
- resource.getContents().add(root);
- }
-
- /**
- * Get the type of the diagram to create.
- *
- * @return diagram type
- */
- public String getCreatedDiagramType() {
- return getDiagramNotationID();
- }
-
- /**
- * @return
- */
- abstract protected String getDiagramNotationID();
-
- /**
- * @return
- */
- abstract protected PreferencesHint getPreferenceHint();
-
- /**
- * Get the name used for diagram.
- *
- * @return
- */
- abstract protected String getDefaultDiagramName();
-
- /**
- * Get currently selected element.
- *
- * @return The currently selected element, or null if any.
- */
- protected EObject getSelectedElement() {
- EObject eObject = null;
- Object selection = getCurrentSelection();
- if(selection != null) {
- eObject = EMFHelper.getEObject(selection);
- }
- return eObject;
- }
-
- /**
- * Get current selection first element.
- *
- * @return the selected element or null.
- */
- private Object getCurrentSelection() {
- ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
- if(selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection)selection;
- return structuredSelection.getFirstElement();
- }
-
- return null;
- }
-
- /**
- * Create a diagram.
- *
- * @param diagramResource
- * the diagram resource
- * @param owner
- * the diagram container
- * @param name
- * the diagram name
- * @return
- */
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
- // create diagram
- Diagram diagram = ViewService.createDiagram(owner, getDiagramNotationID(), getPreferenceHint());
- if(diagram != null) {
- diagram.setName(name);
- diagram.setElement(owner);
- initializeDiagram(diagram);
- diagramResource.getContents().add(diagram);
- }
- return diagram;
- }
-
- protected void initializeDiagram(EObject diagram) {
- };
-
- /**
- * Get the current MultiDiagramEditor.
- *
- * @return
- */
- protected IMultiDiagramEditor getMultiDiagramEditor() {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart editorPart = page.getActiveEditor();
- return (IMultiDiagramEditor)editorPart;
- }
-
- /**
- * Open popup to enter the new diagram name
- *
- * @param defaultValue
- * the default value
- * @return the entered diagram name
- */
- protected String openDiagramNameDialog(String defaultValue) {
- if(defaultValue == null) {
- defaultValue = "";
- }
-
- InputDialog inputDialog = new InputDialog(Display.getCurrent().getActiveShell(), Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_SelectNewDiagramName, Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_NewDiagramName, defaultValue, null);
- int result = inputDialog.open();
-
- if(result == Window.OK) {
- String name = inputDialog.getValue();
- if(name == null || name.length() == 0) {
- name = defaultValue;
- }
- return name;
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void createDiagram(final ModelSet modelSet, final EObject container, final String diagramName) {
- runAsTransaction(modelSet, container, diagramName);
- }
-
- /**
- * {@inheritDoc}
- */
- public ICommand getCreateDiagramCommand(final ModelSet modelSet, final EObject container, final String diagramName) {
- //Diagram creation should not change the semantic resource
- final Resource modelResource = UmlUtils.getUmlResource(modelSet);
- final Resource notationResource = NotationUtils.getNotationResource(modelSet);
- final Resource diResource = DiModelUtils.getDiResource(modelSet);
-
- ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
- if (notationResource.getURI().isPlatformResource()) {
- modifiedFiles.add(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(notationResource.getURI().toPlatformString(true))));
- }
- if (diResource.getURI().isPlatformResource()) {
- modifiedFiles.add(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(diResource.getURI().toPlatformString(true))));
- }
-
- return new AbstractTransactionalCommand(modelSet.getTransactionalEditingDomain(), Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_CreateDiagramCommandLabel, modifiedFiles) {
-
- protected Diagram diagram;
-
- protected EObject modelElement;
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
- String name = diagramName;
- if(name == null) {
- name = openDiagramNameDialog(getDefaultDiagramName());
- }
- // canceled
- if(name == null) {
- return CommandResult.newCancelledCommandResult();
- }
-
- EObject model = container;
- if(model == null) {
- model = getRootElement(modelResource);
- attachModelToResource(model, modelResource);
- }
-
- diagram = createDiagram(notationResource, model, name);
-
- if(diagram != null) {
- try {
- IPageManager pageManager = ServiceUtilsForResource.getInstance().getIPageManager(diResource);
- pageManager.addPage(diagram);
- return CommandResult.newOKCommandResult(diagram);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return CommandResult.newErrorCommandResult(ex);
- }
- }
- return CommandResult.newErrorCommandResult("Error during diagram creation");
- }
-
- @Override
- protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- // the undo corresponds to a destroy diagram command
- // during diagram creation no adapters are set to the diagram so the setElement is not registered
- // to remove the cross reference using the element reference it is better to use the destroy element command
- // DestroyElementPapyrusCommand depc = (diagram != null) ? new DestroyElementPapyrusCommand(new DestroyElementRequest(diagram, false)) : null;
- IStatus status = super.doUndo(monitor, info);
-
- modelElement = diagram.getElement();
- diagram.setElement(null);
- return status;
- }
-
- @Override
- protected IStatus doRedo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- diagram.setElement(modelElement);
- IStatus status = super.doRedo(monitor, info);
- return status;
- }
- };
- }
-
- /**
- * Get the ISashWindowsContentProvider from the main editor.
- *
- * @return
- */
- protected ISashWindowsContentProvider getISashWindowsContentProvider(ServicesRegistry registry) {
- try {
- return registry.getService(ISashWindowsContentProvider.class);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return null;
- }
- }
-
- /**
- * Check if the creation of this diagram is strongly attached to its parent or if it can be reassigned after creation.
- *
- * @return true if parent can be reassigned
- */
- public boolean isParentReassignable() {
- // yes by default
- return true;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2008, 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:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - only calculate affected files for workspace resources (CDO)
+ * Laurent Wouters (CEA) - laurent.wouters@cea.fr - Refactoring for viewpoints
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+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.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ui.IModelElementValidator;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ui.ModelElementSelectionDialog;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Command creating a new GMF diagram in Papyrus. This command is intended to be used in eclipse
+ * extensions.
+ *
+ * Commands to create a GMF Diagram can subclass this class. There is two kinds of commands: -
+ * Eclipse handlers issuing commands (toolbar, menu, ...). This commands can find the active editor
+ * by using the Worbench.getActivePArt(). The entry point is {@link #execute(ExecutionEvent)}. -
+ * Commands called during editor initializing (like wizard). This commands require the diResourceSet
+ * to work. The entry point is {@link #createDiagram(Resource, EObject, String)}
+ *
+ * @author cedric dumoulin
+ * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
+ */
+public abstract class AbstractPapyrusGmfCreateDiagramCommandHandler extends AbstractHandler implements IHandler, ICreationCommand {
+
+ /**
+ * Inner class for the creation of diagrams
+ *
+ * @author Laurent Wouters
+ *
+ */
+ private class Creator {
+ private ModelSet modelSet;
+ private EObject owner;
+ private EObject element;
+ private ViewPrototype prototype;
+ private String name;
+
+ public Creator(ModelSet modelSet, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ this.modelSet = modelSet;
+ this.owner = owner;
+ this.element = element;
+ this.prototype = prototype;
+ this.name = name;
+ }
+
+ private Diagram createDiagram() throws ServiceException {
+ Resource modelResource = UmlUtils.getUmlResource(modelSet);
+ Resource notationResource = NotationUtils.getNotationResource(modelSet);
+ Resource diResource = DiModelUtils.getDiResource(modelSet);
+
+ if (owner == null) {
+ owner = getRootElement(modelResource);
+ attachModelToResource(owner, modelResource);
+ }
+
+ if (!PolicyChecker.getCurrent().canOwnNewView(owner, prototype)) {
+ ModelElementSelectionDialog dialog = new ModelElementSelectionDialog(Display.getCurrent().getActiveShell(), getMultiDiagramEditor().getServicesRegistry(), "Select an appropriate owner for the diagram:", getRootElement(modelResource), owner,
+ new IModelElementValidator() {
+ public String isSelectable(EObject element) {
+ if (PolicyChecker.getCurrent().canOwnNewView(owner, prototype))
+ return null;
+ return "This element cannot own the diagram.";
+ }
+ });
+ int result = dialog.open();
+ if (result != Window.OK)
+ return null;
+ owner = dialog.getSelection();
+ }
+
+ element = prototype.getRootFor(owner);
+ if (!PolicyChecker.getCurrent().canHaveNewView(element, owner, prototype)) {
+ StringBuilder builder = new StringBuilder("Select a root element for the diagram. Allowed types: ");
+ if (prototype.getConfiguration() == null) {
+ builder.append("<unknown>");
+ } else if (prototype.getConfiguration().getModelRules().size() == 0) {
+ builder.append("<unknown>");
+ } else {
+ boolean first = true;
+ for (ModelRule rule : prototype.getConfiguration().getModelRules()) {
+ EClass model = rule.getElement();
+ if (model != null) {
+ if (!first) {
+ builder.append(", ");
+ }
+ first = false;
+ builder.append(model.getName());
+ }
+ }
+ }
+ builder.append(".");
+ ModelElementSelectionDialog dialog = new ModelElementSelectionDialog(Display.getCurrent().getActiveShell(), getMultiDiagramEditor().getServicesRegistry(), builder.toString(), getRootElement(modelResource), element,
+ new IModelElementValidator() {
+ public String isSelectable(EObject element) {
+ if (PolicyChecker.getCurrent().canHaveNewView(element, owner, prototype))
+ return null;
+ return "This element cannot be the root element of the diagram.";
+ }
+ });
+ int result = dialog.open();
+ if (result != Window.OK)
+ return null;
+ element = dialog.getSelection();
+ }
+
+ if (name == null) {
+ name = openDiagramNameDialog(prototype.isNatural() ? getDefaultDiagramName() : "New" + prototype.getLabel().replace(" ", ""));
+ }
+ // canceled
+ if (name == null) {
+ return null;
+ }
+
+ Diagram diagram = doCreateDiagram(notationResource, owner, element, prototype, name);
+
+ if (diagram != null) {
+ IPageManager pageManager = ServiceUtilsForResource.getInstance().getIPageManager(diResource);
+ pageManager.addPage(diagram);
+
+ }
+ return diagram;
+ }
+ }
+
+
+ /**
+ * Get the root element associated with canvas.
+ */
+ private EObject getRootElement(Resource modelResource) {
+ EObject rootElement = null;
+ if (modelResource != null && modelResource.getContents() != null && modelResource.getContents().size() > 0) {
+ Object root = modelResource.getContents().get(0);
+ if (root instanceof EObject) {
+ rootElement = (EObject) root;
+ }
+ }
+
+ return rootElement;
+ }
+
+ /**
+ * Store model element in the resource.
+ */
+ private void attachModelToResource(EObject root, Resource resource) {
+ resource.getContents().add(root);
+ }
+
+ /**
+ * Get the current MultiDiagramEditor.
+ */
+ private IMultiDiagramEditor getMultiDiagramEditor() {
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorPart editorPart = page.getActiveEditor();
+ return (IMultiDiagramEditor) editorPart;
+ }
+
+ /**
+ * Open popup to enter the new diagram name
+ *
+ * @param defaultValue
+ * the default value
+ * @return the entered diagram name
+ */
+ private String openDiagramNameDialog(String defaultValue) {
+ if (defaultValue == null) {
+ defaultValue = "";
+ }
+
+ InputDialog inputDialog = new InputDialog(Display.getCurrent().getActiveShell(), Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_SelectNewDiagramName, Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_NewDiagramName, defaultValue, null);
+ int result = inputDialog.open();
+
+ if (result == Window.OK) {
+ String name = inputDialog.getValue();
+ if (name == null || name.length() == 0) {
+ name = defaultValue;
+ }
+ return name;
+ }
+ return null;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#createDiagram(org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.EObject, java.lang.String)
+ */
+ public final Diagram createDiagram(ModelSet modelSet, EObject owner, String name) {
+ ViewPrototype proto = ViewPrototype.get(getCreatedDiagramType(), owner, owner);
+ if (proto == null)
+ return null;
+ return createDiagram(modelSet, owner, owner, proto, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#createDiagram(org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype, java.lang.String)
+ */
+ public final Diagram createDiagram(ModelSet modelSet, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ ICommand createCmd = getCreateDiagramCommand(modelSet, owner, element, prototype, name);
+ TransactionalEditingDomain dom = modelSet.getTransactionalEditingDomain();
+ CompositeCommand cmd = new CompositeCommand("Create diagram");
+ cmd.add(createCmd);
+ cmd.add(new OpenDiagramCommand(dom, createCmd));
+ dom.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#getCreateDiagramCommand(org.eclipse.papyrus.infra.core.resource.ModelSet, org.eclipse.emf.ecore.EObject, java.lang.String)
+ */
+ public final ICommand getCreateDiagramCommand(ModelSet modelSet, EObject owner, String name) {
+ ViewPrototype proto = ViewPrototype.get(getCreatedDiagramType(), owner, owner);
+ if (proto == null)
+ return null;
+ return getCreateDiagramCommand(modelSet, owner, owner, proto, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#getCreateDiagramCommand(org.eclipse.papyrus.infra.core.resource.ModelSet, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype,
+ * java.lang.String)
+ */
+ public final ICommand getCreateDiagramCommand(final ModelSet modelSet, final EObject owner, final EObject element, final ViewPrototype prototype, final String name) {
+ // Diagram creation should not change the semantic resource
+ final Resource notationResource = NotationUtils.getNotationResource(modelSet);
+ final Resource diResource = DiModelUtils.getDiResource(modelSet);
+
+ ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
+ if (notationResource.getURI().isPlatformResource()) {
+ modifiedFiles.add(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(notationResource.getURI().toPlatformString(true))));
+ }
+ if (diResource.getURI().isPlatformResource()) {
+ modifiedFiles.add(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(diResource.getURI().toPlatformString(true))));
+ }
+
+ return new AbstractTransactionalCommand(modelSet.getTransactionalEditingDomain(), Messages.AbstractPapyrusGmfCreateDiagramCommandHandler_CreateDiagramCommandLabel, modifiedFiles) {
+ private Diagram diagram = null;
+ private EObject diagramElement = null;
+ private EObject diagramOwner = null;
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Creator creator = new Creator(modelSet, owner, element, prototype, name);
+ try {
+ diagram = creator.createDiagram();
+ if (diagram == null)
+ return CommandResult.newCancelledCommandResult();
+ diagramElement = diagram.getElement();
+ diagramOwner = DiagramUtils.getOwner(diagram);
+ return CommandResult.newOKCommandResult(diagram);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return CommandResult.newErrorCommandResult("Error during diagram creation");
+ }
+
+ @Override
+ protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ // the undo corresponds to a destroy diagram command
+ // during diagram creation no adapters are set to the diagram so the setElement is not registered
+ // to remove the cross reference using the element reference it is better to use the destroy element command
+ // DestroyElementPapyrusCommand depc = (diagram != null) ? new DestroyElementPapyrusCommand(new DestroyElementRequest(diagram, false)) : null;
+ IStatus status = super.doUndo(monitor, info);
+ diagram.setElement(null);
+ return status;
+ }
+
+ @Override
+ protected IStatus doRedo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ diagram.setElement(diagramElement);
+ DiagramUtils.setOwner(diagram, diagramOwner);
+ IStatus status = super.doRedo(monitor, info);
+ return status;
+ }
+ };
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#getCreatedDiagramType()
+ */
+ public String getCreatedDiagramType() {
+ return getDiagramNotationID();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.commands.ICreationCommand#isParentReassignable()
+ */
+ public boolean isParentReassignable() {
+ // yes by default
+ return true;
+ }
+
+
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ // This method should not be called, use the execute(ExecutionEvent, ViewPrototype, String) method.
+ throw new UnsupportedOperationException();
+ }
+
+
+ protected abstract String getDiagramNotationID();
+
+ protected abstract PreferencesHint getPreferenceHint();
+
+ protected abstract String getDefaultDiagramName();
+
+ /**
+ * Overridable method that effectively create the diagram with the given validated parameters
+ *
+ * @param diagramResource
+ * the diagram resource
+ * @param owner
+ * the diagram's owner
+ * @param element
+ * the diagram's model element
+ * @param prototype
+ * the diagram's prototype
+ * @param name
+ * the diagram's name
+ * @return the created diagram, or <code>null</code> if the creation failed
+ */
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ // create diagram
+ Diagram diagram = ViewService.createDiagram(element, getDiagramNotationID(), getPreferenceHint());
+ if (diagram != null) {
+ diagram.setName(name);
+ diagram.setElement(element);
+ DiagramUtils.setOwner(diagram, owner);
+ if (!prototype.isNatural())
+ DiagramUtils.setPrototype(diagram, prototype);
+ initializeDiagram(diagram);
+ diagramResource.getContents().add(diagram);
+ }
+ return diagram;
+ }
+
+ /**
+ * Overridable method for the initialization of create diagrams
+ *
+ * @param diagram
+ * the created diagram
+ */
+ protected void initializeDiagram(EObject diagram) {
+
+ };
+}
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
index 0ade2777252..5c7b9e57d0e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/GmfEditorFactory.java
@@ -26,6 +26,7 @@ import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
@@ -201,7 +202,7 @@ public class GmfEditorFactory extends AbstractEditorFactory {
*
*/
public Image getTabIcon() {
- ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
+ ImageDescriptor imageDescriptor = DiagramUtils.getPrototype(diagram).getIconDescriptor();
if(imageDescriptor == null)
return null;
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java
new file mode 100755
index 00000000000..cd6e89e6823
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/handler/DynamicDiagramsMenuContribution.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.handler;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.DynamicContribution;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the dynamic contribution of a policy to menus
+ * @author Laurent Wouters
+ */
+public class DynamicDiagramsMenuContribution extends DynamicContribution {
+ /**
+ * Constructor.
+ */
+ public DynamicDiagramsMenuContribution() { }
+
+ /**
+ * Constructor.
+ * @param id
+ */
+ public DynamicDiagramsMenuContribution(String id) {
+ super(id);
+ }
+
+ /**
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+ */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ final EObject selection = getSelection();
+ if (selection == null)
+ return new IContributionItem[0];
+
+ // build a list of all the available prototypes
+ List<ViewPrototype> data = new ArrayList<ViewPrototype>();
+ for (final ViewPrototype proto : PolicyChecker.getCurrent().getPrototypesFor(selection)) {
+ if (!(proto.getConfiguration() instanceof PapyrusDiagram))
+ continue;
+ data.add(proto);
+ }
+
+ // sort them
+ Collections.sort(data, new ViewPrototype.Comp());
+
+ // build the full labels
+ List<String> labels = new ArrayList<String>(data.size());
+ String last = null;
+ boolean first = true;
+ for (ViewPrototype item : data) {
+ String label = item.getLabel();
+ if (last != null && last.equals(label)) {
+ // name collision
+ if (first) {
+ labels.set(labels.size() - 1, data.get(labels.size() - 1).getFullLabel());
+ first = false;
+ }
+ labels.add(item.getFullLabel());
+ } else {
+ labels.add(label);
+ last = label;
+ first = true;
+ }
+ }
+
+ // build the menu
+ List<IContributionItem> items = new ArrayList<IContributionItem>(data.size());
+ for (int i = 0; i != data.size(); i++) {
+ final ViewPrototype proto = data.get(i);
+ String label = labels.get(i);
+ items.add(new ActionContributionItem(new Action(CREATE_MESSAGE + label, proto.getIconDescriptor()) {
+ @Override
+ public void run() {
+ proto.instantiateOn(selection);
+ }
+ }));
+ }
+ return items.toArray(new IContributionItem[items.size()]);
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramEditHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramEditHelper.java
new file mode 100755
index 00000000000..96a332820f5
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramEditHelper.java
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelper;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+
+/**
+ * Represents an Edit Helper for GMF Diagrams
+ * @author Laurent Wouters
+ */
+public class DiagramEditHelper implements IEditHelper {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelper#canEdit(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ */
+ public boolean canEdit(IEditCommandRequest req) {
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelper#getEditCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest)
+ */
+ public ICommand getEditCommand(final IEditCommandRequest req) {
+ if (req instanceof DestroyElementRequest) {
+ DestroyElementRequest r = (DestroyElementRequest)req;
+ return getDestroyDiagramCommand((Diagram)r.getElementToDestroy());
+ } else if (req instanceof SetRequest) {
+ SetRequest r = (SetRequest)req;
+ return GetSimpleSetCommand(r.getElementToEdit(), r.getFeature(), r.getValue());
+ } else if (req instanceof CreateElementRequest) {
+ CreateElementRequest r = (CreateElementRequest)req;
+ EObject container = r.getContainer();
+ if (container instanceof Diagram)
+ return getCreateCommand((Diagram)container, r.getContainmentFeature(), r.getElementType());
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelper#getContainedValues(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EReference)
+ */
+ public List getContainedValues(EObject eContainer, EReference feature) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Gets the command for destroying the given diagram
+ * @param diagram The diagram to destroy
+ * @return The appropriate command
+ */
+ private ICommand getDestroyDiagramCommand(final Diagram diagram) {
+ final Resource resource = diagram.eResource();
+ return new AbstractCommand("Destroy diagram") {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ resource.getContents().remove(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ resource.getContents().remove(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ resource.getContents().add(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ }
+
+ /**
+ * Gets the command for setting a property of a view
+ * @param object The object to modify
+ * @param feature The feature to modify
+ * @param newValue The new value for the feature
+ * @return The appropriate command
+ */
+ private ICommand GetSimpleSetCommand(final EObject object, final EStructuralFeature feature, final Object newValue) {
+ return new AbstractCommand("Edit property") {
+ private Object oldValue;
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ oldValue = object.eGet(feature);
+ object.eSet(feature, newValue);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ object.eSet(feature, newValue);
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ object.eSet(feature, oldValue);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ }
+
+
+ /**
+ * Gets the command for the creation of an element in a diagram
+ * @param diagram The diagram to change
+ * @param reference The containment feature
+ * @param type The type of the element to be created
+ * @return The appropriate command
+ */
+ private ICommand getCreateCommand(final Diagram diagram, final EReference reference, final IElementType type) {
+ return new AbstractCommand("Create element") {
+ private EObject newElement;
+ private ModelAddData data;
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ data = PolicyChecker.getCurrent().getChildAddData(diagram, diagram.getElement().eClass(), type.getEClass());
+ if (!data.isPermitted())
+ return CommandResult.newErrorCommandResult("The current active viewpoint policy prevents the addition of this element to the view");
+ newElement = type.getEClass().getEPackage().getEFactoryInstance().create(type.getEClass());
+ if (data.isPathDefined()) {
+ if (!data.execute(diagram.getElement(), newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the path");
+ } else {
+ diagram.getElement().eSet(reference, newElement);
+ }
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ data.redoExecute();
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ data.undoExecute();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
new file mode 100755
index 00000000000..e28a4eaf4ec
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/DiagramPrototype.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents a prototype of GMF diagram for the viewpoints infrastructure
+ * @author Laurent Wouters
+ */
+public class DiagramPrototype extends ViewPrototype {
+ protected final String category;
+ protected final AbstractPapyrusGmfCreateDiagramCommandHandler command;
+
+ public DiagramPrototype(PapyrusView configuration, String category, AbstractPapyrusGmfCreateDiagramCommandHandler command) {
+ super(configuration);
+ this.category = category;
+ this.command = command;
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner) {
+ return instantiateOn(owner, null);
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner, String name) {
+ ServicesRegistry registry;
+ try {
+ registry = ServiceUtilsForEObject.getInstance().getServiceRegistry(owner);
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ return false;
+ }
+ ModelSet modelSet;
+ try {
+ modelSet = registry.getService(ModelSet.class);
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ return false;
+ }
+ Object result = command.createDiagram(modelSet, owner, owner, this, name);
+ return (result != null);
+ }
+
+ @Override
+ public boolean isOwnerReassignable() {
+ // Users can always move diagrams that are part of their viewpoint
+ return true;
+ }
+
+ @Override
+ public Command getCommandChangeOwner(EObject view, final EObject target) {
+ final Diagram diagram = (Diagram)view;
+ final EObject previous = DiagramUtils.getOwner(diagram);
+ return new AbstractCommand("Change diagram owner") {
+ @Override
+ public void execute() {
+ DiagramUtils.setOwner(diagram, target);
+ }
+ @Override
+ public void redo() {
+ DiagramUtils.setOwner(diagram, previous);
+ }
+ @Override
+ protected boolean prepare() { return true; }
+ };
+ }
+
+ @Override
+ public Command getCommandChangeRoot(EObject view, final EObject target) {
+ final Diagram diagram = (Diagram)view;
+ final EObject previous = diagram.getElement();
+ return new AbstractCommand("Change diagram root element") {
+ @Override
+ public void execute() {
+ diagram.setElement(target);
+ }
+ @Override
+ public void redo() {
+ diagram.setElement(previous);
+ }
+ @Override
+ protected boolean prepare() { return true; }
+ };
+ }
+
+ @Override
+ public EObject getOwnerOf(EObject view) {
+ return DiagramUtils.getOwner((Diagram)view);
+ }
+
+ @Override
+ public EObject getRootOf(EObject view) {
+ return ((Diagram)view).getElement();
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
new file mode 100755
index 00000000000..19544a0c3ea
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/GMFDiagramViewTypeHelper.java
@@ -0,0 +1,165 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.helper;
+
+import java.util.HashMap;
+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.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the dynamic contribution of a policy to menus
+ * @author Laurent Wouters
+ */
+public class GMFDiagramViewTypeHelper implements IViewTypeHelper {
+ /**
+ * ID of the extension point for Papyrus diagrams
+ */
+ private static final String EXTENSION_PAPYRUS_DIAGRAM = "org.eclipse.papyrus.infra.core.papyrusDiagram";
+
+ private static class NakedViewPrototype extends DiagramPrototype {
+ private final String label;
+ private final String icon;
+ public NakedViewPrototype(PapyrusView configuration, String category, AbstractPapyrusGmfCreateDiagramCommandHandler command, String label, String icon) {
+ super(configuration, category, command);
+ this.label = label;
+ this.icon = icon;
+ }
+ @Override
+ public String getLabel() { return label; }
+ @Override
+ public String getIconURI() { return icon; }
+ }
+
+ private static class Implementation {
+ public final String name;
+ public final String icon;
+ public final String language;
+ public final AbstractPapyrusGmfCreateDiagramCommandHandler command;
+ public Implementation(String name, String icon, String language, AbstractPapyrusGmfCreateDiagramCommandHandler command) {
+ this.name = name;
+ this.icon = icon;
+ this.language = language;
+ this.command = command;
+ }
+ }
+
+
+ /**
+ * The cache of prototypes
+ */
+ private Map<PapyrusView, DiagramPrototype> cache;
+
+ /**
+ * The cache of implementations
+ */
+ private Map<String, Implementation> implementations;
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EClass)
+ */
+ public boolean isSupported(EClass type) {
+ return EcoreUtil.equals(type, ConfigurationPackage.eINSTANCE.getPapyrusDiagram());
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#isSupported(org.eclipse.emf.ecore.EObject)
+ */
+ public boolean isSupported(EObject view) {
+ return (view instanceof Diagram);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeFor(org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView)
+ */
+ public ViewPrototype getPrototypeFor(PapyrusView configuration) {
+ if (!(configuration instanceof PapyrusDiagram))
+ return null;
+ if (implementations == null)
+ buildImplementationCache();
+ if (cache == null)
+ cache = new HashMap<PapyrusView, DiagramPrototype>();
+ if (cache.containsKey(configuration))
+ return cache.get(configuration);
+ if (!implementations.containsKey(configuration.getImplementationID()))
+ return null;
+ Implementation impl = implementations.get(configuration.getImplementationID());
+ if (ViewPrototype.isNatural(configuration)) {
+ NakedViewPrototype proto = new NakedViewPrototype(configuration, impl.language, impl.command, impl.name, impl.icon);
+ cache.put(configuration, proto);
+ return proto;
+ } else {
+ DiagramPrototype proto = new DiagramPrototype(configuration, impl.language, impl.command);
+ cache.put(configuration, proto);
+ return proto;
+ }
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper#getPrototypeOf(org.eclipse.emf.ecore.EObject)
+ */
+ public ViewPrototype getPrototypeOf(EObject view) {
+ if (!(view instanceof Diagram))
+ return null;
+ return DiagramUtils.getPrototype((Diagram)view);
+ }
+
+ /**
+ * Builds the cache of metadata
+ */
+ private void buildImplementationCache() {
+ implementations = new HashMap<String, Implementation>();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_PAPYRUS_DIAGRAM);
+ IExtension[] extensions = point.getExtensions();
+ for (int i=0; i!=extensions.length; i++) {
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j=0; j!=elements.length; j++) {
+ if (elements[j].getName().equals("creationCommand")) {
+ try {
+ Object obj = elements[j].createExecutableExtension("creationCommandClass");
+ if (obj instanceof AbstractPapyrusGmfCreateDiagramCommandHandler) {
+ AbstractPapyrusGmfCreateDiagramCommandHandler command = (AbstractPapyrusGmfCreateDiagramCommandHandler)obj;
+ String label = elements[j].getAttribute("label");
+ String icon = elements[j].getAttribute("icon");
+ String language = elements[j].getAttribute("language");
+ String implID = command.getCreatedDiagramType();
+ if (!icon.startsWith("platform:/"))
+ icon = "platform:/plugin/" + extensions[i].getContributor().getName() + "/" + icon;
+ if (!implementations.containsKey(implID))
+ implementations.put(implID, new Implementation(label, icon, language, command));
+ }
+ }
+ catch (CoreException e) { }
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
index 7d783690bec..5d9b14456b6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/helper/NotationHelper.java
@@ -11,7 +11,6 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.helper;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
@@ -34,18 +33,8 @@ public class NotationHelper {
if(source instanceof View) {
return (View)source;
}
- if(source instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable)source;
- Object adapter = adaptable.getAdapter(View.class);
- if(adapter != null) {
- return (View)adapter;
- }
- adapter = EMFHelper.getEObject(adaptable);
- if(adapter instanceof View) {
- return (View)adapter;
- }
- }
- return null;
+ EObject obj = EMFHelper.getEObject(source);
+ return (obj instanceof View) ? (View) obj : null;
}
/**
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
index 9ad8ee049be..606fa01febd 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationUtils.java
@@ -1,272 +1,210 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * 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:
- * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.common.model;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
-
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-/**
- * Utilities method to manage notation models. Should be moved in a more
- * suitable plugin
- */
-public class NotationUtils {
-
- /**
- * Get the notation Resource.
- *
- * @return
- *
- * @deprecated Usage of the internal Resource is discouraged.
- */
- @Deprecated
- public static Resource getNotationResource() {
- return getNotationModel().getResource();
- }
-
- /**
- * Gets the NotationModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not
- * designed to be call from Editors. This method can return null if called
- * during the MultiEditor initialization.
- *
- * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
- * @return The {@link NotationModel} of the current editor, or null if not
- * found.
- */
- public static NotationModel getNotationModel() {
-
- try {
- return (NotationModel)ServiceUtilsForActionHandlers.getInstance().getModelSet().getModel(NotationModel.MODEL_ID);
- } catch (ServiceException e) {
- return null;
- }
- }
-
- /**
- * Gets the NotationModel for the currently selected editor. <br>
- * Warning: This method is designed to be call from ui.handlers. It is not
- * designed to be call from Editors. This method can return null if called
- * during the MultiEditor initialization.
- *
- * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
- *
- * @return The {@link NotationModel} of the current editor, or null if not
- * found.
- * @throws ServiceException
- * If an error occurs while getting or starting the service.
- */
- public static NotationModel getNotationModelChecked() throws ServiceException {
-
- return (NotationModel)ServiceUtilsForActionHandlers.getInstance().getModelSet().getModel(NotationModel.MODEL_ID);
- }
-
- /**
- * Gets the NotationModel from the {@link ModelSet}. <br>
- *
- * @param modelsManager
- * The modelManager containing the requested model.
- *
- * @return The {@link NotationModel} registered in modelManager, or null if
- * not found.
- */
- public static NotationModel getNotationModel(ModelSet modelsManager) {
-
- return (NotationModel)modelsManager.getModel(NotationModel.MODEL_ID);
- }
-
- /**
- * Gets the direct associated diagram of the specified eObject.
- *
- * @param eObject
- * @param notationResource
- *
- * @return the associated diagram
- */
- public static Diagram getAssociatedDiagram(Resource notationResource, EObject eObject) {
- if(notationResource != null) {
- for(EObject obj : notationResource.getContents()) {
- if(obj instanceof Diagram) {
- Diagram diagram = (Diagram)obj;
- if(eObject != null && eObject.equals(diagram.getElement())) {
- return diagram;
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Gets the direct associated diagram of the specified eObject.
- *
- * @param eObject
- * @param notationResource
- * @param resolve
- * the resource if true
- *
- * @return the associated diagram
- */
- public static Diagram getAssociatedDiagram(Resource notationResource, EObject eObject, boolean resolve) {
- if(notationResource != null && resolve) {
- EcoreUtil.resolveAll(notationResource);
- }
- return getAssociatedDiagram(notationResource, eObject);
- }
-
- /**
- * Gets the all the diagrams contained in the specified ancestor eObject
- *
- * @param notationResource
- * @param eObject
- *
- * @return all the contained diagrams
- *
- */
- public static List<Diagram> getDiagrams(Resource notationResource, EObject eObject) {
- List<Diagram> diagrams = new LinkedList<Diagram>();
- if(notationResource != null) {
- for(EObject obj : notationResource.getContents()) {
- if(obj instanceof Diagram) {
- Diagram diagram = (Diagram)obj;
- if(EcoreUtil.isAncestor(eObject, diagram.getElement())) {
- diagrams.add(diagram);
- }
- }
- }
- }
- return diagrams;
- }
-
- /**
- * Gets the all the diagrams contained in the specified ancestor eObject
- *
- * @param notationResource
- * @param eObject
- * @param resolve
- * the resource if true
- *
- * @return all the contained diagrams
- */
- public static List<Diagram> getDiagrams(Resource notationResource, EObject eObject, boolean resolve) {
- if(notationResource != null && resolve) {
- EcoreUtil.resolveAll(notationResource);
- }
- return getDiagrams(notationResource, eObject);
- }
-
- /**
- * Helper to retrieve the Notation resource associated to a ModelSet. May be null.
- *
- * @param from
- * @return
- */
- public static Resource getNotationResource(ModelSet from) {
- IModel notationModel = from.getModel(NotationModel.MODEL_ID);
- if(notationModel instanceof NotationModel) {
- return ((NotationModel)notationModel).getResource();
- }
- return null;
- }
-
- /**
- * Helper to retrieve the Notation resource associated to a ServicesRegistry. May be null.
- *
- * @param from
- * @return
- */
- public static Resource getNotationResource(ServicesRegistry registry) {
- try {
- ModelSet modelSet = ServiceUtils.getInstance().getModelSet(registry);
- return getNotationResource(modelSet);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return null;
- }
- }
-
- /**
- * Gets the loaded associated diagrams of the specified eObject.
- * This method uses the cross referencer to compute them.
- *
- * @param eObject
- * @param notationResource
- *
- * @return the associated diagram
- */
- public static List<Diagram> getLoadedAssociatedDiagrams(EObject eObject) {
- Predicate<EStructuralFeature.Setting> p = new Predicate<EStructuralFeature.Setting>() {
-
- public boolean apply(EStructuralFeature.Setting setting) {
- return setting.getEObject() instanceof Diagram && NotationPackage.Literals.VIEW__ELEMENT.equals(setting.getEStructuralFeature());
- }
- };
- Function<EStructuralFeature.Setting, Diagram> f = new Function<EStructuralFeature.Setting, Diagram>() {
-
- public Diagram apply(EStructuralFeature.Setting setting) {
- return (Diagram)setting.getEObject();
- }
-
- };
- return Lists.newArrayList(Iterables.transform(Iterables.filter(EMFHelper.getUsages(eObject), p), f));
- }
-
- /**
- * Gets the all the diagrams contained in the specified ancestor eObject and
- * currently stored in the specified notation resource.
- *
- * @param notationResource
- * @param eObject
- *
- * @return all the contained diagrams
- *
- */
- public static List<Diagram> getAllDescendantDiagramsInResource(EObject eObject, Resource notationResource) {
- List<Diagram> diagrams = new ArrayList<Diagram>();
- if(notationResource != null) {
- for(EObject obj : notationResource.getContents()) {
- if(obj instanceof Diagram) {
- Diagram diagram = (Diagram)obj;
- if(EcoreUtil.isAncestor(eObject, diagram.getElement())) {
- diagrams.add(diagram);
- }
- }
- }
- }
- return diagrams;
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * 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:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.model;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+
+/**
+ * Utilities method to manage notation models. Should be moved in a more
+ * suitable plugin
+ */
+public class NotationUtils {
+
+ /**
+ * Get the notation Resource.
+ *
+ * @return
+ *
+ * @deprecated Usage of the internal Resource is discouraged.
+ */
+ @Deprecated
+ public static Resource getNotationResource() {
+ return getNotationModel().getResource();
+ }
+
+ /**
+ * Gets the NotationModel for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
+ *
+ * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
+ *
+ * @return The {@link NotationModel} of the current editor, or null if not
+ * found.
+ */
+ public static NotationModel getNotationModel() {
+
+ try {
+ return (NotationModel)ServiceUtilsForActionHandlers.getInstance().getModelSet().getModel(NotationModel.MODEL_ID);
+ } catch (ServiceException e) {
+ return null;
+ }
+ }
+
+ /**
+ * Gets the NotationModel for the currently selected editor. <br>
+ * Warning: This method is designed to be call from ui.handlers. It is not
+ * designed to be call from Editors. This method can return null if called
+ * during the MultiEditor initialization.
+ *
+ * @see ServiceUtilsForActionHandlers.getInstance().getModelSet()
+ *
+ * @return The {@link NotationModel} of the current editor, or null if not
+ * found.
+ * @throws ServiceException
+ * If an error occurs while getting or starting the service.
+ */
+ public static NotationModel getNotationModelChecked() throws ServiceException {
+
+ return (NotationModel)ServiceUtilsForActionHandlers.getInstance().getModelSet().getModel(NotationModel.MODEL_ID);
+ }
+
+ /**
+ * Gets the NotationModel from the {@link ModelSet}. <br>
+ *
+ * @param modelsManager
+ * The modelManager containing the requested model.
+ *
+ * @return The {@link NotationModel} registered in modelManager, or null if
+ * not found.
+ */
+ public static NotationModel getNotationModel(ModelSet modelsManager) {
+
+ return (NotationModel)modelsManager.getModel(NotationModel.MODEL_ID);
+ }
+
+ /**
+ * Gets the direct associated diagram of the specified eObject.
+ *
+ * @param eObject
+ * @param notationResource
+ *
+ * @return the associated diagram
+ */
+ public static Diagram getAssociatedDiagram(Resource notationResource, EObject eObject) {
+ if(notationResource != null) {
+ for(EObject obj : notationResource.getContents()) {
+ if(obj instanceof Diagram) {
+ Diagram diagram = (Diagram)obj;
+ if (DiagramUtils.getOwner(diagram) == eObject)
+ return diagram;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the direct associated diagram of the specified eObject.
+ *
+ * @param eObject
+ * @param notationResource
+ * @param resolve
+ * the resource if true
+ *
+ * @return the associated diagram
+ */
+ public static Diagram getAssociatedDiagram(Resource notationResource, EObject eObject, boolean resolve) {
+ if(notationResource != null && resolve) {
+ EcoreUtil.resolveAll(notationResource);
+ }
+ return getAssociatedDiagram(notationResource, eObject);
+ }
+
+ /**
+ * Gets the all the diagrams contained in the specified ancestor eObject
+ *
+ * @param notationResource
+ * @param eObject
+ *
+ * @return all the contained diagrams
+ *
+ */
+ public static List<Diagram> getDiagrams(Resource notationResource, EObject eObject) {
+ List<Diagram> diagrams = new LinkedList<Diagram>();
+ if(notationResource != null) {
+ for(EObject obj : notationResource.getContents()) {
+ if(obj instanceof Diagram) {
+ Diagram diagram = (Diagram)obj;
+ if (EcoreUtil.isAncestor(eObject, DiagramUtils.getOwner(diagram)))
+ diagrams.add(diagram);
+ }
+ }
+ }
+ return diagrams;
+ }
+
+ /**
+ * Gets the all the diagrams contained in the specified ancestor eObject
+ *
+ * @param notationResource
+ * @param eObject
+ * @param resolve
+ * the resource if true
+ *
+ * @return all the contained diagrams
+ */
+ public static List<Diagram> getDiagrams(Resource notationResource, EObject eObject, boolean resolve) {
+ if(notationResource != null && resolve) {
+ EcoreUtil.resolveAll(notationResource);
+ }
+ return getDiagrams(notationResource, eObject);
+ }
+
+ /**
+ * Helper to retrieve the Notation resource associated to a ModelSet. May be null.
+ *
+ * @param from
+ * @return
+ */
+ public static Resource getNotationResource(ModelSet from) {
+ IModel notationModel = from.getModel(NotationModel.MODEL_ID);
+ if(notationModel instanceof NotationModel) {
+ return ((NotationModel)notationModel).getResource();
+ }
+ return null;
+ }
+
+ /**
+ * Helper to retrieve the Notation resource associated to a ServicesRegistry. May be null.
+ *
+ * @param from
+ * @return
+ */
+ public static Resource getNotationResource(ServicesRegistry registry) {
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(registry);
+ return getNotationResource(modelSet);
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ return null;
+ }
+ }
+}
+
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java
index cd8d0de611f..7a7c2daef82 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java
@@ -11,6 +11,8 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.providers;
+import javax.swing.text.Element;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
@@ -19,15 +21,14 @@ import org.eclipse.gmf.runtime.notation.BasicCompartment;
import org.eclipse.gmf.runtime.notation.DecorationNode;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.core.editorsfactory.IPageIconsRegistry;
-import org.eclipse.papyrus.infra.core.editorsfactory.PageIconsRegistry;
-import org.eclipse.papyrus.infra.core.extension.diagrameditor.PluggableEditorFactoryReader;
import org.eclipse.papyrus.infra.emf.providers.EMFLabelProvider;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.swt.graphics.Image;
import org.eclipse.uml2.uml.NamedElement;
-import org.w3c.dom.Element;
/**
* A Label Provider for GMF Notation model
@@ -37,28 +38,27 @@ public class NotationLabelProvider extends EMFLabelProvider {
/** icon for a compartment */
public static final String ICON_COMPARTMENT = "/icons/none_comp_vis.gif"; //$NON-NLS-1$
- private IPageIconsRegistry pageIconsRegistry;
-
@Override
public void dispose() {
super.dispose();
- if(pageIconsRegistry != null) {
- pageIconsRegistry.dispose();
- pageIconsRegistry = null;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ EObject eObject = EMFHelper.getEObject(element);
+ if (eObject != null) {
+ return getImage(eObject);
}
+ return super.getImage(element);
}
@Override
protected Image getImage(EObject element) {
if(element instanceof Diagram) {
- //return getPagesIconsRegistry().getEditorIcp
- if(pageIconsRegistry == null) {
- pageIconsRegistry = new PageIconsRegistry();
- PluggableEditorFactoryReader editorReader = new PluggableEditorFactoryReader(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
- editorReader.populate((PageIconsRegistry)pageIconsRegistry);
- }
-
- return pageIconsRegistry.getEditorIcon(element);
+ ViewPrototype proto = DiagramUtils.getPrototype((Diagram)element);
+ if (proto == null)
+ return null;
+ return proto.getIcon();
}
// if the element is a compartment
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java
new file mode 100755
index 00000000000..4e78d0e5047
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/DiagramUtils.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
+import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
+
+/**
+ * Utilities for the management of configuration-related data on views and diagrams
+ * @author Laurent Wouters
+ */
+public class DiagramUtils {
+
+ /**
+ * Gets the diagram associated to the given edit part
+ * @param part The edit part
+ * @return The diagram associated to the edit part, or <code>null</code> if none is found
+ */
+ public static Diagram getDiagramFrom(EditPart part) {
+ EditPart current = part;
+ while (current != null) {
+ Object model = current.getModel();
+ if (model instanceof Diagram)
+ return (Diagram)model;
+ current = current.getParent();
+ }
+ return null;
+ }
+
+ /**
+ * Gets the owner of a diagram as it will appear in the model explorer.
+ * In the case where the diagram does not yet have a defined owner, the diagram's root element will be returned instead.
+ * @param diagram A diagram
+ * @return The diagram's owner
+ */
+ public static EObject getOwner(Diagram diagram) {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null) {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)style;
+ EObject value = pvs.getOwner();
+ if (value != null)
+ return value;
+ }
+ // This is the legacy fallback for old diagrams
+ return diagram.getElement();
+ }
+
+ /**
+ * Sets the owner of a diagram as it will appear in the model explorer
+ * @param diagram A diagram
+ * @param owner The new diagram's owner
+ */
+ public static void setOwner(Diagram diagram, EObject owner) {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null) {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)style;
+ pvs.setOwner(owner);
+ } else {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)diagram.createStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ pvs.setOwner(owner);
+ }
+ }
+
+ /**
+ * Gets the prototype of a diagram
+ * @param diagram A diagram
+ * @return The diagram's prototype
+ */
+ public static ViewPrototype getPrototype(Diagram diagram) {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null) {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)style;
+ PapyrusView config = pvs.getConfiguration();
+ if (config != null) {
+ if (PolicyChecker.getCurrent().isInViewpoint(config))
+ return ViewPrototype.get(config);
+ return ViewPrototype.UNAVAILABLE_DIAGRAM;
+ }
+ return ViewPrototype.get(diagram.getType(), pvs.getOwner(), diagram.getElement());
+ }
+ // This is the legacy fallback for old diagrams
+ if ("Package".equals(diagram.getType())) {
+ for (ViewPrototype prototype : PolicyChecker.getCurrent().getAllPrototypes()) {
+ if ("UML Package Diagram".equals(prototype.getLabel()))
+ return prototype;
+ }
+ }
+ return ViewPrototype.get(diagram.getType(), diagram.getElement(), diagram.getElement());
+ }
+
+ /**
+ * Sets the prototype of a diagram
+ * @param diagram A diagram
+ * @param configuration The new diagram's prototype
+ */
+ public static void setPrototype(Diagram diagram, ViewPrototype prototype) {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null) {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)style;
+ pvs.setConfiguration(prototype.getConfiguration());
+ } else {
+ PapyrusViewStyle pvs = (PapyrusViewStyle)diagram.createStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ pvs.setConfiguration(prototype.getConfiguration());
+ }
+ }
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/src/org/eclipse/papyrus/infra/gmfdiag/controlmode/ControlDiagramsCommand.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/src/org/eclipse/papyrus/infra/gmfdiag/controlmode/ControlDiagramsCommand.java
index 34ed42b72bc..08fb60c2c03 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/src/org/eclipse/papyrus/infra/gmfdiag/controlmode/ControlDiagramsCommand.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode/src/org/eclipse/papyrus/infra/gmfdiag/controlmode/ControlDiagramsCommand.java
@@ -99,7 +99,7 @@ public class ControlDiagramsCommand extends AbstractControlCommand {
if(notationResource == null) {
throw new ExecutionException("unable to retrieve old notation resource");
}
- return NotationUtils.getAllDescendantDiagramsInResource(getRequest().getTargetObject(), notationResource);
+ return NotationUtils.getDiagrams(notationResource, getRequest().getTargetObject());
}
/**
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
index a0090e3f2c6..7ad5863dd55 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/META-INF/MANIFEST.MF
@@ -18,7 +18,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.emf.facet.efacet,
org.eclipse.papyrus.emf.facet.efacet.metamodel,
org.eclipse.papyrus.emf.facet.custom.metamodel,
- org.eclipse.papyrus.infra.emf
+ org.eclipse.papyrus.infra.emf,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/plugin.xml b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/plugin.xml
index 90d477a5bca..6d23ed58823 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/plugin.xml
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/plugin.xml
@@ -2,34 +2,9 @@
<?eclipse version="3.4"?>
<plugin>
-
-<extension point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
- <modeldeclaration file="resources/PapyrusDiagram.custom"/>
-</extension>
-
- <!-- TODO: EMF-FACET
- <extension point="org.eclipse.papyrus.emf.facet.infra.query.registration">
- <modelqueryset file="resources/PapyrusNotationFacet.querySet">
- </modelqueryset>
- </extension>
-
- <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization
- file="resources/PapyrusNotation.uiCustom"
- loadByDefault="true"/>
- </extension>
- <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization
- file="resources/PapyrusNotationFacet.uiCustom"
- loadByDefault="true"/>
- </extension>
- <extension
- point="org.eclipse.papyrus.emf.facet.infra.facet.registration">
- <facetset
- file="resources/PapyrusNotationFacet.facetSet">
- </facetset>
+ <extension point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
+ <modeldeclaration file="resources/PapyrusDiagram.custom"/>
</extension>
- -->
<extension
point="org.eclipse.ui.handlers">
<handler
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java
index c5c535df52d..c9ebb4e79b6 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetContainedDiagrams.java
@@ -20,6 +20,7 @@ import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
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;
@@ -41,7 +42,7 @@ public class GetContainedDiagrams extends AbstractEditorContainerQuery implement
while(roots.hasNext()) {
EObject root = roots.next();
if(root instanceof Diagram) {
- if(EcoreUtil.equals(((Diagram)root).getElement(), source)) {
+ if (EcoreUtil.equals(DiagramUtils.getOwner((Diagram) root), source)) {
result.add((Diagram)root);
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java
index 23b836b4cf5..3572004ef38 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/GetDiagramIcon.java
@@ -14,6 +14,8 @@
package org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries;
import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage;
import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils;
import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
@@ -27,6 +29,7 @@ public class GetDiagramIcon extends AbstractGetEditorIconQuery implements IJavaQ
public IImage evaluate(Diagram source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
- return ImageUtils.wrap(org.eclipse.emf.common.util.URI.createPlatformPluginURI(getEditorRegistry(source).getEditorURLIcon(source), true).toString()); //$NON-NLS-1$
+ ViewPrototype prototype = DiagramUtils.getPrototype(source);
+ return ImageUtils.wrap(prototype.getIconURI());
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
index 23e6be9f436..348eff81323 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/src/org/eclipse/papyrus/infra/gmfdiag/modelexplorer/queries/IsDiagramContainer.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
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;
@@ -46,7 +47,7 @@ public class IsDiagramContainer extends AbstractEditorContainerQuery implements
while(roots.hasNext()) {
EObject root = roots.next();
if(root instanceof Diagram) {
- if(EcoreUtil.equals(((Diagram)root).getElement(), source)) {
+ if (EcoreUtil.equals(DiagramUtils.getOwner((Diagram) root), source)) {
return true;
}
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreateDiagramWithNavigationHandler.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreateDiagramWithNavigationHandler.java
deleted file mode 100644
index 3bc66d3ed60..00000000000
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation/src/org/eclipse/papyrus/infra/gmfdiag/navigation/CreateDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.navigation;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.core.extension.commands.ICreationCondition;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
-import org.eclipse.papyrus.infra.widgets.toolbox.dialog.InformationDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * This command handler will try to create a diagram on the currently selected
- * element, using navigation if necessary. The action is always available and
- * the check is done in the run to avoid heavy navigation computation on each
- * selection change.
- *
- * @author mvelten
- *
- */
-public abstract class CreateDiagramWithNavigationHandler extends AbstractHandler {
-
- private ICreationCondition creationCondition;
-
- private ICreationCommand creationCommand;
-
- public CreateDiagramWithNavigationHandler(ICreationCommand creationCommand, ICreationCondition creationCondition) {
- super();
- this.creationCommand = creationCommand;
- this.creationCondition = creationCondition;
- }
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- NavigableElement navElement = getNavigableElementWhereToCreateDiagram(event);
- ServicesRegistry registry;
- try {
- registry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return null;
- }
-
- if(navElement == null) {
- InformationDialog dialog = new InformationDialog(Display.getCurrent().getActiveShell(), "Impossible diagram creation", "It is not possible to create this diagram on the selected element.", null, null, SWT.OK, MessageDialog.WARNING, new String[]{ IDialogConstants.OK_LABEL });
- dialog.open();
- } else {
- createDiagram(navElement, registry);
- }
- return null;
- }
-
- private NavigableElement getNavigableElementWhereToCreateDiagram(ExecutionEvent event) {
- ISelection selection = HandlerUtil.getCurrentSelection(event);
- if(selection.isEmpty()) {
- return null;
- }
-
- if(selection instanceof IStructuredSelection) {
- EObject selectedElement = EMFHelper.getEObject(((IStructuredSelection)selection).getFirstElement());
-
- if(selectedElement != null) {
- // First check if the current element can host the requested diagram
- if(creationCondition.create(selectedElement)) {
- return new ExistingNavigableElement(selectedElement, null);
- } else {
- List<NavigableElement> navElements = NavigationHelper.getInstance().getAllNavigableElements(selectedElement);
- // this will sort elements by navigation depth
- Collections.sort(navElements);
-
- for(NavigableElement navElement : navElements) {
- // ignore existing elements because we want a hierarchy to
- // be created if it is not on the current element
- if(navElement instanceof CreatedNavigableElement && creationCondition.create(navElement.getElement())) {
- return navElement;
- }
- }
- }
- }
- }
-
- return null;
- }
-
- private void createDiagram(NavigableElement navElement, ServicesRegistry registry) {
- ModelSet modelSet;
- try {
- modelSet = ServiceUtils.getInstance().getModelSet(registry);
- } catch (ServiceException ex) {
- Activator.log.error(ex);
- return;
- }
-
- if(navElement != null && modelSet != null) {
- try {
- CompositeCommand command = NavigationHelper.getLinkCreateAndOpenNavigableDiagramCommand(navElement, creationCommand, null, modelSet);
- modelSet.getTransactionalEditingDomain().getCommandStack().execute(new GMFtoEMFCommandWrapper(command));
- } catch (Exception e) {
- }
- }
- }
-
- /**
- * Resolve semantic element
- *
- * @param object
- * the object to resolve
- * @return <code>null</code> or the semantic element associated to the
- * specified object
- */
- protected EObject resolveSemanticObject(Object object) {
- if(object instanceof EObject) {
- return (EObject)object;
- }
- Object businessObject = BusinessModelResolver.getInstance().getBusinessModel(object);
- if(businessObject instanceof EObject) {
- return (EObject)businessObject;
- }
- return null;
- }
-
- @Override
- public void setEnabled(Object evaluationContext) {
- if(evaluationContext instanceof IEvaluationContext) {
- Object selectionVariable = ((IEvaluationContext)evaluationContext).getDefaultVariable();
-
- if(selectionVariable instanceof Collection<?>) {
- List<?> selection = (selectionVariable instanceof List<?>) ? (List<?>)selectionVariable : new java.util.ArrayList<Object>((Collection<?>)selectionVariable);
- if(selection.size() != 1) {
- setBaseEnabled(false);
- return;
- }
-
- EObject target = EMFHelper.getEObject(selection.get(0));
- setBaseEnabled(creationCondition.create(target));
- }
- }
- super.setEnabled(evaluationContext);
- }
-
-}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
index d922ee2a532..cbdf8697d24 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.gmfdiag.properties.extension,
org.eclipse.papyrus.infra.gmfdiag.properties.modelelement
Bundle-Vendor: %Bundle-Vendor
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx
index 530b8df9e75..484a6246643 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/notation.ctx
@@ -37,9 +37,6 @@
<sections name="Single RelativeBendpoints" sectionFile="ui/SingleRelativeBendpoints.xwt">
<widget href="ui/SingleRelativeBendpoints.xwt#/"/>
</sections>
- <sections name="Single Diagram" sectionFile="ui/SingleDiagram.xwt">
- <widget href="ui/SingleDiagram.xwt#/"/>
- </sections>
<sections name="Single Image" sectionFile="ui/SingleImage.xwt">
<widget href="ui/SingleImage.xwt#/"/>
</sections>
@@ -184,18 +181,18 @@
<widget href="ui/SingleRulersAndGrid.xwt#/"/>
</sections>
</tabs>
- <views name="Single Diagram" sections="//@tabs.0/@sections.12" automaticContext="true" datacontexts="//@dataContexts.0/@elements.12">
+ <tabs label="General" id="general" category="org.eclipse.papyrus" priority="75">
+ <sections name="Single Diagram" sectionFile="ui/SingleDiagram.xwt">
+ <widget href="ui/SingleDiagram.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="Single Diagram" sections="//@tabs.2/@sections.0" automaticContext="true" datacontexts="//@dataContexts.0/@elements.12">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleDiagram">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Diagram"/>
</constraints>
</views>
- <views name="Single Decorable Element" sections="//@tabs.0/@sections.58" automaticContext="true" datacontexts="//@dataContexts.1/@elements.0">
- <constraints xsi:type="constraints:SimpleConstraint" name="isDecorableElementConstraint">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.4"/>
- </constraints>
- </views>
<views name="Single Edge" sections="//@tabs.0/@sections.0" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleEdge">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
@@ -280,112 +277,112 @@
<properties xsi:type="constraints:ValueProperty" name="className" value="RelativeBendpoints"/>
</constraints>
</views>
- <views name="Single Image" sections="//@tabs.0/@sections.13" automaticContext="true" datacontexts="//@dataContexts.0/@elements.13">
+ <views name="Single Image" sections="//@tabs.0/@sections.12" automaticContext="true" datacontexts="//@dataContexts.0/@elements.13">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleImage">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Image"/>
</constraints>
</views>
- <views name="Single Guide" sections="//@tabs.0/@sections.14" automaticContext="true" datacontexts="//@dataContexts.0/@elements.14">
+ <views name="Single Guide" sections="//@tabs.0/@sections.13" automaticContext="true" datacontexts="//@dataContexts.0/@elements.14">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleGuide">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Guide"/>
</constraints>
</views>
- <views name="Single NodeEntry" sections="//@tabs.0/@sections.15" automaticContext="true" datacontexts="//@dataContexts.0/@elements.15">
+ <views name="Single NodeEntry" sections="//@tabs.0/@sections.14" automaticContext="true" datacontexts="//@dataContexts.0/@elements.15">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleNodeEntry">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="NodeEntry"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single StringToPropertyValueMapEntry" sections="//@tabs.0/@sections.16" automaticContext="true" datacontexts="//@dataContexts.0/@elements.16">
+ <views name="Single StringToPropertyValueMapEntry" sections="//@tabs.0/@sections.15" automaticContext="true" datacontexts="//@dataContexts.0/@elements.16">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleStringToPropertyValueMapEntry">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StringToPropertyValueMapEntry"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single PropertyValue" sections="//@tabs.0/@sections.17" automaticContext="true" datacontexts="//@dataContexts.0/@elements.17">
+ <views name="Single PropertyValue" sections="//@tabs.0/@sections.16" automaticContext="true" datacontexts="//@dataContexts.0/@elements.17">
<constraints xsi:type="constraints:SimpleConstraint" name="isSinglePropertyValue">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="PropertyValue"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single StringObjectConverter" sections="//@tabs.0/@sections.18" automaticContext="true" datacontexts="//@dataContexts.0/@elements.18">
+ <views name="Single StringObjectConverter" sections="//@tabs.0/@sections.17" automaticContext="true" datacontexts="//@dataContexts.0/@elements.18">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleStringObjectConverter">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StringObjectConverter"/>
</constraints>
</views>
- <views name="Single Shape" sections="//@tabs.0/@sections.19" automaticContext="true" datacontexts="//@dataContexts.0/@elements.19">
+ <views name="Single Shape" sections="//@tabs.0/@sections.18" automaticContext="true" datacontexts="//@dataContexts.0/@elements.19">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleShape">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Shape"/>
</constraints>
</views>
- <views name="Single Compartment" sections="//@tabs.0/@sections.20" automaticContext="true" datacontexts="//@dataContexts.0/@elements.20">
+ <views name="Single Compartment" sections="//@tabs.0/@sections.19" automaticContext="true" datacontexts="//@dataContexts.0/@elements.20">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Compartment"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single ListCompartment" sections="//@tabs.0/@sections.21" automaticContext="true" datacontexts="//@dataContexts.0/@elements.21">
+ <views name="Single ListCompartment" sections="//@tabs.0/@sections.20" automaticContext="true" datacontexts="//@dataContexts.0/@elements.21">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleListCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="ListCompartment"/>
</constraints>
</views>
- <views name="Single Connector" sections="//@tabs.0/@sections.22" automaticContext="true" datacontexts="//@dataContexts.0/@elements.22">
+ <views name="Single Connector" sections="//@tabs.0/@sections.21" automaticContext="true" datacontexts="//@dataContexts.0/@elements.22">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleConnector">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Connector"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single StandardDiagram" sections="//@tabs.0/@sections.23" automaticContext="true" datacontexts="//@dataContexts.0/@elements.23">
+ <views name="Single StandardDiagram" sections="//@tabs.0/@sections.22" automaticContext="true" datacontexts="//@dataContexts.0/@elements.23">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleStandardDiagram">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StandardDiagram"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single DecorationNode" sections="//@tabs.0/@sections.24" automaticContext="true" datacontexts="//@dataContexts.0/@elements.24">
+ <views name="Single DecorationNode" sections="//@tabs.0/@sections.23" automaticContext="true" datacontexts="//@dataContexts.0/@elements.24">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleDecorationNode">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="DecorationNode"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single BasicDecorationNode" sections="//@tabs.0/@sections.25" automaticContext="true" datacontexts="//@dataContexts.0/@elements.25">
+ <views name="Single BasicDecorationNode" sections="//@tabs.0/@sections.24" automaticContext="true" datacontexts="//@dataContexts.0/@elements.25">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleBasicDecorationNode">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicDecorationNode"/>
</constraints>
</views>
- <views name="Single BasicCompartment" sections="//@tabs.0/@sections.26" automaticContext="true" datacontexts="//@dataContexts.0/@elements.26">
+ <views name="Single BasicCompartment" sections="//@tabs.0/@sections.25" automaticContext="true" datacontexts="//@dataContexts.0/@elements.26">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleBasicCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicCompartment"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single BasicSemanticCompartment" sections="//@tabs.0/@sections.27" automaticContext="true" datacontexts="//@dataContexts.0/@elements.27">
+ <views name="Single BasicSemanticCompartment" sections="//@tabs.0/@sections.26" automaticContext="true" datacontexts="//@dataContexts.0/@elements.27">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleBasicSemanticCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicSemanticCompartment"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views name="Single SemanticListCompartment" sections="//@tabs.0/@sections.28" automaticContext="true" datacontexts="//@dataContexts.0/@elements.28">
+ <views name="Single SemanticListCompartment" sections="//@tabs.0/@sections.27" automaticContext="true" datacontexts="//@dataContexts.0/@elements.28">
<constraints xsi:type="constraints:SimpleConstraint" name="isSingleSemanticListCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="SemanticListCompartment"/>
@@ -398,209 +395,214 @@
<properties xsi:type="constraints:ValueProperty" name="className" value="org.eclipse.papyrus.infra.gmfdiag.properties.constraint.IsSingleDiagramEditorConstraint"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Edge" sections="//@tabs.0/@sections.29" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
+ <views elementMultiplicity="-1" name="Multiple Edge" sections="//@tabs.0/@sections.28" automaticContext="true" datacontexts="//@dataContexts.0/@elements.0">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleEdge">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Edge"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Node" sections="//@tabs.0/@sections.30" automaticContext="true" datacontexts="//@dataContexts.0/@elements.1">
+ <views elementMultiplicity="-1" name="Multiple Node" sections="//@tabs.0/@sections.29" automaticContext="true" datacontexts="//@dataContexts.0/@elements.1">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleNode">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Node"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple LayoutConstraint" sections="//@tabs.0/@sections.31" automaticContext="true" datacontexts="//@dataContexts.0/@elements.2">
+ <views elementMultiplicity="-1" name="Multiple LayoutConstraint" sections="//@tabs.0/@sections.30" automaticContext="true" datacontexts="//@dataContexts.0/@elements.2">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleLayoutConstraint">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="LayoutConstraint"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Size" sections="//@tabs.0/@sections.32" automaticContext="true" datacontexts="//@dataContexts.0/@elements.3">
+ <views elementMultiplicity="-1" name="Multiple Size" sections="//@tabs.0/@sections.31" automaticContext="true" datacontexts="//@dataContexts.0/@elements.3">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleSize">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Size"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Location" sections="//@tabs.0/@sections.33" automaticContext="true" datacontexts="//@dataContexts.0/@elements.4">
+ <views elementMultiplicity="-1" name="Multiple Location" sections="//@tabs.0/@sections.32" automaticContext="true" datacontexts="//@dataContexts.0/@elements.4">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleLocation">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Location"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Bounds" sections="//@tabs.0/@sections.34" automaticContext="true" datacontexts="//@dataContexts.0/@elements.5">
+ <views elementMultiplicity="-1" name="Multiple Bounds" sections="//@tabs.0/@sections.33" automaticContext="true" datacontexts="//@dataContexts.0/@elements.5">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleBounds">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Bounds"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Ratio" sections="//@tabs.0/@sections.35" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
+ <views elementMultiplicity="-1" name="Multiple Ratio" sections="//@tabs.0/@sections.34" automaticContext="true" datacontexts="//@dataContexts.0/@elements.6">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleRatio">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Ratio"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Anchor" sections="//@tabs.0/@sections.36" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
+ <views elementMultiplicity="-1" name="Multiple Anchor" sections="//@tabs.0/@sections.35" automaticContext="true" datacontexts="//@dataContexts.0/@elements.7">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleAnchor">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Anchor"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Bendpoints" sections="//@tabs.0/@sections.37" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
+ <views elementMultiplicity="-1" name="Multiple Bendpoints" sections="//@tabs.0/@sections.36" automaticContext="true" datacontexts="//@dataContexts.0/@elements.8">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleBendpoints">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Bendpoints"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple IdentityAnchor" sections="//@tabs.0/@sections.38" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9">
+ <views elementMultiplicity="-1" name="Multiple IdentityAnchor" sections="//@tabs.0/@sections.37" automaticContext="true" datacontexts="//@dataContexts.0/@elements.9">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleIdentityAnchor">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="IdentityAnchor"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple View" sections="//@tabs.0/@sections.39" automaticContext="true" datacontexts="//@dataContexts.0/@elements.10">
+ <views elementMultiplicity="-1" name="Multiple View" sections="//@tabs.0/@sections.38" automaticContext="true" datacontexts="//@dataContexts.0/@elements.10">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleView">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="View"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple RelativeBendpoints" sections="//@tabs.0/@sections.40" automaticContext="true" datacontexts="//@dataContexts.0/@elements.11">
+ <views elementMultiplicity="-1" name="Multiple RelativeBendpoints" sections="//@tabs.0/@sections.39" automaticContext="true" datacontexts="//@dataContexts.0/@elements.11">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleRelativeBendpoints">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="RelativeBendpoints"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Diagram" sections="//@tabs.0/@sections.41" automaticContext="true" datacontexts="//@dataContexts.0/@elements.12">
+ <views elementMultiplicity="-1" name="Multiple Diagram" sections="//@tabs.0/@sections.40" automaticContext="true" datacontexts="//@dataContexts.0/@elements.12">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleDiagram">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Diagram"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Image" sections="//@tabs.0/@sections.42" automaticContext="true" datacontexts="//@dataContexts.0/@elements.13">
+ <views elementMultiplicity="-1" name="Multiple Image" sections="//@tabs.0/@sections.41" automaticContext="true" datacontexts="//@dataContexts.0/@elements.13">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleImage">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Image"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Guide" sections="//@tabs.0/@sections.43" automaticContext="true" datacontexts="//@dataContexts.0/@elements.14">
+ <views elementMultiplicity="-1" name="Multiple Guide" sections="//@tabs.0/@sections.42" automaticContext="true" datacontexts="//@dataContexts.0/@elements.14">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleGuide">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Guide"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple NodeEntry" sections="//@tabs.0/@sections.44" automaticContext="true" datacontexts="//@dataContexts.0/@elements.15">
+ <views elementMultiplicity="-1" name="Multiple NodeEntry" sections="//@tabs.0/@sections.43" automaticContext="true" datacontexts="//@dataContexts.0/@elements.15">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleNodeEntry">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="NodeEntry"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple StringToPropertyValueMapEntry" sections="//@tabs.0/@sections.45" automaticContext="true" datacontexts="//@dataContexts.0/@elements.16">
+ <views elementMultiplicity="-1" name="Multiple StringToPropertyValueMapEntry" sections="//@tabs.0/@sections.44" automaticContext="true" datacontexts="//@dataContexts.0/@elements.16">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleStringToPropertyValueMapEntry">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StringToPropertyValueMapEntry"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple PropertyValue" sections="//@tabs.0/@sections.46" automaticContext="true" datacontexts="//@dataContexts.0/@elements.17">
+ <views elementMultiplicity="-1" name="Multiple PropertyValue" sections="//@tabs.0/@sections.45" automaticContext="true" datacontexts="//@dataContexts.0/@elements.17">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultiplePropertyValue">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="PropertyValue"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple StringObjectConverter" sections="//@tabs.0/@sections.47" automaticContext="true" datacontexts="//@dataContexts.0/@elements.18">
+ <views elementMultiplicity="-1" name="Multiple StringObjectConverter" sections="//@tabs.0/@sections.46" automaticContext="true" datacontexts="//@dataContexts.0/@elements.18">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleStringObjectConverter">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StringObjectConverter"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Shape" sections="//@tabs.0/@sections.48" automaticContext="true" datacontexts="//@dataContexts.0/@elements.19">
+ <views elementMultiplicity="-1" name="Multiple Shape" sections="//@tabs.0/@sections.47" automaticContext="true" datacontexts="//@dataContexts.0/@elements.19">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleShape">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Shape"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Compartment" sections="//@tabs.0/@sections.49" automaticContext="true" datacontexts="//@dataContexts.0/@elements.20">
+ <views elementMultiplicity="-1" name="Multiple Compartment" sections="//@tabs.0/@sections.48" automaticContext="true" datacontexts="//@dataContexts.0/@elements.20">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Compartment"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple ListCompartment" sections="//@tabs.0/@sections.50" automaticContext="true" datacontexts="//@dataContexts.0/@elements.21">
+ <views elementMultiplicity="-1" name="Multiple ListCompartment" sections="//@tabs.0/@sections.49" automaticContext="true" datacontexts="//@dataContexts.0/@elements.21">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleListCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="ListCompartment"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple Connector" sections="//@tabs.0/@sections.51" automaticContext="true" datacontexts="//@dataContexts.0/@elements.22">
+ <views elementMultiplicity="-1" name="Multiple Connector" sections="//@tabs.0/@sections.50" automaticContext="true" datacontexts="//@dataContexts.0/@elements.22">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleConnector">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="Connector"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple StandardDiagram" sections="//@tabs.0/@sections.52" automaticContext="true" datacontexts="//@dataContexts.0/@elements.23">
+ <views elementMultiplicity="-1" name="Multiple StandardDiagram" sections="//@tabs.0/@sections.51" automaticContext="true" datacontexts="//@dataContexts.0/@elements.23">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleStandardDiagram">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="StandardDiagram"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple DecorationNode" sections="//@tabs.0/@sections.53" automaticContext="true" datacontexts="//@dataContexts.0/@elements.24">
+ <views elementMultiplicity="-1" name="Multiple DecorationNode" sections="//@tabs.0/@sections.52" automaticContext="true" datacontexts="//@dataContexts.0/@elements.24">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleDecorationNode">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="DecorationNode"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple BasicDecorationNode" sections="//@tabs.0/@sections.54" automaticContext="true" datacontexts="//@dataContexts.0/@elements.25">
+ <views elementMultiplicity="-1" name="Multiple BasicDecorationNode" sections="//@tabs.0/@sections.53" automaticContext="true" datacontexts="//@dataContexts.0/@elements.25">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleBasicDecorationNode">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicDecorationNode"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple BasicCompartment" sections="//@tabs.0/@sections.55" automaticContext="true" datacontexts="//@dataContexts.0/@elements.26">
+ <views elementMultiplicity="-1" name="Multiple BasicCompartment" sections="//@tabs.0/@sections.54" automaticContext="true" datacontexts="//@dataContexts.0/@elements.26">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleBasicCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicCompartment"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple BasicSemanticCompartment" sections="//@tabs.0/@sections.56" automaticContext="true" datacontexts="//@dataContexts.0/@elements.27">
+ <views elementMultiplicity="-1" name="Multiple BasicSemanticCompartment" sections="//@tabs.0/@sections.55" automaticContext="true" datacontexts="//@dataContexts.0/@elements.27">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleBasicSemanticCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="BasicSemanticCompartment"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
</constraints>
</views>
- <views elementMultiplicity="-1" name="Multiple SemanticListCompartment" sections="//@tabs.0/@sections.57" automaticContext="true" datacontexts="//@dataContexts.0/@elements.28">
+ <views elementMultiplicity="-1" name="Multiple SemanticListCompartment" sections="//@tabs.0/@sections.56" automaticContext="true" datacontexts="//@dataContexts.0/@elements.28">
<constraints xsi:type="constraints:SimpleConstraint" name="isMultipleSemanticListCompartment">
<constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.3"/>
<properties xsi:type="constraints:ValueProperty" name="nsUri" value="http://www.eclipse.org/gmf/runtime/1.0.2/notation"/>
<properties xsi:type="constraints:ValueProperty" name="className" value="SemanticListCompartment"/>
</constraints>
</views>
+ <views name="Single Decorable Element" sections="//@tabs.0/@sections.57" automaticContext="true" datacontexts="//@dataContexts.1/@elements.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isDecorableElementConstraint">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.gmfdiag.properties/model/Environment.xmi#//@constraintTypes.4"/>
+ </constraints>
+ </views>
<dataContexts name="notation" label="notation">
<elements name="Edge" supertypes="//@dataContexts.0/@elements.10">
<properties name="source" type="Reference"/>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
index 0e7eb2296f9..d08acaed9e0 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/model/notation/ui/SingleDiagram.xwt
@@ -11,6 +11,8 @@
<ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
</Composite.layout>
<ppe:StringEditor input="{Binding}" property="notation:Diagram:name"></ppe:StringEditor>
- <ppe:StringLabel input="{Binding}" property="notation:View:type"></ppe:StringLabel>
+ <ppe:ReferenceLabel input="{Binding}" property="notation:View:prototype" readOnly="true" customLabel="View Type"></ppe:ReferenceLabel>
+ <ppe:ReferenceDialog input="{Binding}" property="notation:View:owner" customLabel="Owner"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="notation:View:element" customLabel="Root element"></ppe:ReferenceDialog>
</Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
index f85b81ae344..a85ef90af4c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/modelelement/GMFModelElement.java
@@ -19,17 +19,28 @@ import org.eclipse.emf.databinding.FeaturePath;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.gmfdiag.properties.Activator;
import org.eclipse.papyrus.infra.gmfdiag.properties.databinding.GradientObservableValue;
+import org.eclipse.papyrus.infra.gmfdiag.properties.provider.ModelContentProvider;
+import org.eclipse.papyrus.infra.gmfdiag.properties.util.LegacyOwnerObservable;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableList;
import org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableValue;
import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+import org.eclipse.swt.graphics.Image;
/**
* A ModelElement to represent an element of the GMF Notation metamodel
@@ -65,7 +76,29 @@ public class GMFModelElement extends EMFModelElement {
}
@Override
+ protected boolean isFeatureEditable(String propertyPath) {
+ if (propertyPath.endsWith("owner")) {
+ return true;
+ }
+ return super.isFeatureEditable(propertyPath);
+ }
+
+ @Override
protected IObservable doGetObservable(String propertyPath) {
+ if (propertyPath.endsWith("owner")) {
+ Diagram diagram = (Diagram)source;
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null)
+ return new PapyrusObservableValue(style, StylePackage.Literals.PAPYRUS_VIEW_STYLE__OWNER, domain);
+ return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_VIEW_STYLE__OWNER, domain);
+ } else if (propertyPath.endsWith("prototype")) {
+ Diagram diagram = (Diagram)source;
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null)
+ return new PapyrusObservableValue(style, StylePackage.Literals.PAPYRUS_VIEW_STYLE__CONFIGURATION, domain);
+ return new LegacyOwnerObservable(diagram, StylePackage.Literals.PAPYRUS_VIEW_STYLE__CONFIGURATION, domain);
+ }
+
FeaturePath featurePath = getFeaturePath(propertyPath);
EStructuralFeature feature = getFeature(propertyPath);
@@ -88,6 +121,22 @@ public class GMFModelElement extends EMFModelElement {
@Override
public ILabelProvider getLabelProvider(String propertyPath) {
+ if (propertyPath.endsWith("prototype")) {
+ return new ILabelProvider() {
+ public void addListener(ILabelProviderListener listener) { }
+ public void removeListener(ILabelProviderListener listener) { }
+ public void dispose() { }
+ public boolean isLabelProperty(Object element, String property) { return false; }
+ public Image getImage(Object element) {
+ ViewPrototype proto = DiagramUtils.getPrototype((Diagram)source);
+ return proto.getIcon();
+ }
+ public String getText(Object element) {
+ ViewPrototype proto = DiagramUtils.getPrototype((Diagram)source);
+ return proto.getQualifiedName();
+ }
+ };
+ }
try {
return ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, source).getLabelProvider();
} catch (ServiceException ex) {
@@ -96,4 +145,43 @@ public class GMFModelElement extends EMFModelElement {
}
}
+ /**
+ * @see org.eclipse.papyrus.views.properties.modelelement.EMFModelElement#getContentProvider(java.lang.String)
+ */
+ @Override
+ public IStaticContentProvider getContentProvider(String propertyPath) {
+ if (propertyPath.endsWith("element")) {
+ Diagram diagram = (Diagram)source;
+ return new ModelContentProvider(diagram, getRoot(diagram.getElement())) {
+ @Override
+ protected boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype) {
+ return PolicyChecker.getCurrent().canHaveNewView(selection, DiagramUtils.getOwner(diagram), prototype);
+ }
+ };
+ } else if (propertyPath.endsWith("owner")) {
+ Diagram diagram = (Diagram) source;
+ return new ModelContentProvider(diagram, getRoot(diagram.getElement())) {
+ @Override
+ protected boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype) {
+ return PolicyChecker.getCurrent().canHaveNewView(diagram.getElement(), selection, prototype);
+ }
+ };
+ }
+ return super.getContentProvider(propertyPath);
+ }
+
+ /**
+ * Gets the root EObject from the given one
+ * @param obj An object
+ * @return The root object which is an ancestor of the given one
+ */
+ private EObject getRoot(EObject obj) {
+ EObject current = obj;
+ EObject parent = obj.eContainer();
+ while (parent != null) {
+ current = parent;
+ parent = parent.eContainer();
+ }
+ return current;
+ }
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java
new file mode 100755
index 00000000000..78e29021201
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/provider/ModelContentProvider.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.properties.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ui.ECoreModelContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * Represents a simple ECore model content provider for the selection of a diagram's root model element
+ * @author Laurent Wouters
+ */
+public abstract class ModelContentProvider extends ECoreModelContentProvider implements IStaticContentProvider, IHierarchicContentProvider {
+
+ /**
+ * The diagram
+ */
+ private Diagram diagram;
+
+ /**
+ * Initializes the provider with the given root
+ * @param diagram The diagram for which a root model element is to be provided
+ * @param root The root object
+ */
+ public ModelContentProvider(Diagram diagram, EObject root) {
+ super(root);
+ this.diagram = diagram;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider#getElements()
+ */
+ public Object[] getElements() {
+ return getElements(null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider#isValidValue(java.lang.Object)
+ */
+ public boolean isValidValue(Object element) {
+ if (element == null)
+ return false;
+ if (!(element instanceof EObject))
+ return false;
+ ViewPrototype prototype = DiagramUtils.getPrototype(diagram);
+ if (prototype == null)
+ return false;
+ return isValid((EObject) element, diagram, prototype);
+ }
+
+ /**
+ * Determines whether the selection is valid
+ *
+ * @param selection
+ * The selection
+ * @param diagram
+ * The diagram
+ * @param prototype
+ * The diagram's prototype
+ * @return <code>true</code> if the selection is valid
+ */
+ protected abstract boolean isValid(EObject selection, Diagram diagram, ViewPrototype prototype);
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java
new file mode 100755
index 00000000000..8b941318fae
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties/src/org/eclipse/papyrus/infra/gmfdiag/properties/util/LegacyOwnerObservable.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.properties.util;
+
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
+import org.eclipse.papyrus.uml.tools.databinding.PapyrusObservableValue;
+
+/**
+ * Represents the observable value of a diagram's owner in the case where the diagram does not yet have the viewpoints-compatible style for holding the value itself
+ * @author Laurent Wouters
+ */
+public class LegacyOwnerObservable extends AbstractObservableValue {
+
+ private EditingDomain domain;
+ private Diagram diagram;
+ private EReference reference;
+ private IChangeListener styleListener;
+ private IChangeListener valueListener;
+ private PapyrusObservableValue styleObservable;
+ private PapyrusObservableValue valueObservable;
+
+ /**
+ * Initializes the observables
+ * @param diagram The diagram to be observed
+ * @param domain The editing domain
+ */
+ public LegacyOwnerObservable(Diagram diagram, EReference feature, EditingDomain domain) {
+ super(Realm.getDefault());
+ this.domain = domain;
+ this.diagram = diagram;
+ this.reference = feature;
+ buildStyleListener();
+ this.styleObservable = new PapyrusObservableValue(diagram, NotationPackage.Literals.VIEW__STYLES, domain);
+ this.styleObservable.addChangeListener(styleListener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#isStale()
+ */
+ public boolean isStale() {
+ return (valueListener != null);
+ }
+
+ /**
+ * Builds the listener for the styles property of the diagram
+ */
+ private void buildStyleListener() {
+ this.styleListener = new IChangeListener() {
+ public void handleChange(ChangeEvent event) {
+ if (valueListener != null)
+ return;
+ Style style = LegacyOwnerObservable.this.diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ if (style != null)
+ buildValueListener(style);
+ }
+ };
+ }
+
+ /**
+ * Builds the listener for the EObjectValue property of the style
+ * @param style The style to be observed
+ */
+ private void buildValueListener(Style style) {
+ this.valueListener = new IChangeListener() {
+ public void handleChange(ChangeEvent event) {
+ fireValueChange(new ValueDiff() {
+ public Object getOldValue() { return null; }
+ public Object getNewValue() { return DiagramUtils.getOwner(diagram); }
+ });
+ }
+ };
+ valueObservable = new PapyrusObservableValue(style, reference, domain);
+ valueObservable.addChangeListener(valueListener);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
+ */
+ public Object getValueType() {
+ return EcorePackage.Literals.EOBJECT;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doGetValue()
+ */
+ protected Object doGetValue() {
+ return DiagramUtils.getOwner(diagram);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doSetValue(java.lang.Object)
+ */
+ protected void doSetValue(Object value) {
+ Command emfCommand = getCommand((EObject) value);
+ domain.getCommandStack().execute(emfCommand);
+ }
+
+ private Command getCommand(final EObject newValue) {
+ final EObject oldValue = DiagramUtils.getOwner(diagram);
+
+ return new AbstractCommand("Change diagram's owner") {
+ private boolean createStyle = true;
+
+ public void execute() {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ createStyle = (style == null);
+ DiagramUtils.setOwner(diagram, newValue);
+ }
+
+ public void redo() {
+ DiagramUtils.setOwner(diagram, newValue);
+ }
+
+ @Override
+ public void undo() {
+ if (createStyle) {
+ Style style = diagram.getStyle(StylePackage.Literals.PAPYRUS_VIEW_STYLE);
+ diagram.getStyles().remove(style);
+ } else {
+ DiagramUtils.setOwner(diagram, oldValue);
+ }
+ }
+
+ @Override
+ public boolean prepare() {
+ return true;
+ }
+ };
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF
index c3685758a62..272941560fd 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.e4.ui.workbench,
org.eclipse.e4.core.contexts,
org.eclipse.core.expressions,
- org.eclipse.emf.edit.ui
+ org.eclipse.emf.edit.ui,
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.nattable.common,
org.eclipse.papyrus.infra.nattable.common.editor,
org.eclipse.papyrus.infra.nattable.common.factory,
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
index a6220b4d8d6..93fcd4b7399 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
@@ -8,16 +8,24 @@
</extension>
<extension id="papyrus.table.menuspapyrus.table.menu" name="Papyrus Table Menus" point="org.eclipse.ui.menus">
<menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <menu icon="icons/table.gif" id="org.eclipse.papyrus.infra.nattable.popupmenu.createnattable" label="New Table (New version)" mnemonic="&amp;T" tooltip="The Papyrus Table Menu">
+ <menu icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif" id="org.eclipse.papyrus.infra.nattable.popupmenu.createnattable" label="New Table" mnemonic="&amp;T" tooltip="The Papyrus Table Menu">
+ <dynamic
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution"
+ id="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution">
+ </dynamic>
</menu>
</menuContribution>
<menuContribution allPopups="false" locationURI="menu:org.eclipse.papyrus.ui.menu?after=org.eclipse.papyrus.uml.diagram.ui.menu.diagrams">
<menu
- icon="icons/table.gif"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif"
id="org.eclipse.papyrus.infra.nattable.menu.createnattable"
- label="New Table (New version)"
+ label="New Table"
mnemonic="&amp;T"
tooltip="The Papyrus Table Menu">
+ <dynamic
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution"
+ id="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution">
+ </dynamic>
</menu>
</menuContribution>
@@ -161,5 +169,61 @@
type="org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable">
</adapter>
</factory>
+</extension>
+<extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar">
+ <command
+ commandId="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.tables.command"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif"
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.tables.command"
+ label="Create a new table ..."
+ style="pulldown"
+ tooltip="Create a new table ...">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </toolbar>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="menu:org.eclipse.papyrus.infra.viewpoints.policy.toolbar.tables.command">
+ <dynamic
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution"
+ id="org.eclipse.papyrus.infra.nattable.common.handlers.DynamicTablesMenuContribution">
+ </dynamic>
+ </menuContribution>
+</extension>
+<extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.infra.viewpoints.policy.commands"
+ defaultHandler="org.eclipse.papyrus.infra.viewpoints.policy.DynamicCommandHandler"
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar.tables.command"
+ name="Create Dynamic Table Command">
+ </command>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.viewType">
+ <helper
+ class="org.eclipse.papyrus.infra.nattable.common.helper.TableCommandHelper">
+ </helper>
+</extension>
+<extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.viewType">
+ <helper
+ class="org.eclipse.papyrus.infra.nattable.common.helper.SyncTableCommandHelper">
+ </helper>
</extension>
</plugin>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java
index 75b61a09193..f7f18c4dede 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java
@@ -83,27 +83,34 @@ public abstract class AbstractCreateNattableEditorHandler extends AbstractHandle
}
/**
- * Run the command as a transaction. Create a Transaction and delegate the
- * command to {@link #doExecute(ServicesRegistry)}.
- *
- * @throws ServiceException
- *
+ * Prompts the user the future table's name
+ * @return The name, or <code>null</code> if the user cancelled the creation
*/
- public void runAsTransaction(final ExecutionEvent event) throws ServiceException {
+ public String askName() {
//we create a new resourceSet to avoid to load unused config in the resourceset in case of Cancel
ResourceSet set = new ResourceSetImpl();
Resource res = set.getResource(getTableEditorConfigurationURI(), true);
TableConfiguration conf = (TableConfiguration)res.getContents().get(0);
String defaultName = conf.getName();
// default Value
- final String name;
final String nameWithIncrement = EditorNameInitializer.getNameWithIncrement(NattablePackage.eINSTANCE.getTable(), NattableconfigurationPackage.eINSTANCE.getTableNamedElement_Name(), defaultName, getTableContext());
final InputDialog dialog = new InputDialog(Display.getDefault().getActiveShell(), Messages.AbstractCreateNattableEditorHandler_PapyrusTableCreation, Messages.AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable, nameWithIncrement, null);
- if(dialog.open() == Dialog.OK) {
- name = dialog.getValue();
+ if(dialog.open() == Dialog.OK)
+ return dialog.getValue();
+ return null;
+ }
+
+ /**
+ * Run the command as a transaction. Create a Transaction and delegate the
+ * command to {@link #doExecute(ServicesRegistry)}.
+ *
+ * @throws ServiceException
+ *
+ */
+ public void runAsTransaction(final ExecutionEvent event) throws ServiceException {
+ String name = askName();
+ if (name != null)
runAsTransaction(event, name);
- }
-
}
/**
@@ -158,14 +165,13 @@ public abstract class AbstractCreateNattableEditorHandler extends AbstractHandle
* @throws ServiceException
* @throws NotFoundException
*/
- public void doExecute(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
-
- final Object editorModel = createEditorModel(serviceRegistry, name, description);
+ public Table doExecute(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
+ final Table editorModel = createEditorModel(serviceRegistry, name, description);
// Get the mngr allowing to add/open new editor.
final IPageManager pageMngr = ServiceUtils.getInstance().getIPageManager(serviceRegistry);
// add the new editor model to the sash.
pageMngr.openPage(editorModel);
-
+ return editorModel;
}
/**
@@ -177,7 +183,7 @@ public abstract class AbstractCreateNattableEditorHandler extends AbstractHandle
* @throws NotFoundException
* The model where to save the TableInstance is not found.
*/
- protected Object createEditorModel(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
+ protected Table createEditorModel(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
final TableConfiguration configuration = getDefaultTableEditorConfiguration();
assert configuration != null;
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/DynamicTablesMenuContribution.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/DynamicTablesMenuContribution.java
new file mode 100755
index 00000000000..687e6050a82
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/DynamicTablesMenuContribution.java
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.common.handlers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+import org.eclipse.papyrus.infra.viewpoints.policy.DynamicContribution;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the dynamic contribution of a policy to menus
+ * @author Laurent Wouters
+ */
+public class DynamicTablesMenuContribution extends DynamicContribution {
+ /**
+ * Constructor.
+ */
+ public DynamicTablesMenuContribution() { }
+
+ /**
+ * Constructor.
+ * @param id
+ */
+ public DynamicTablesMenuContribution(String id) {
+ super(id);
+ }
+
+ /**
+ * @see org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
+ */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ final EObject selection = getSelection();
+ if (selection == null)
+ return new IContributionItem[0];
+
+ // build a list of all the available prototypes
+ List<ViewPrototype> data = new ArrayList<ViewPrototype>();
+ for (final ViewPrototype proto : PolicyChecker.getCurrent().getPrototypesFor(selection)) {
+ if (!(proto.getConfiguration() instanceof PapyrusTable || proto.getConfiguration() instanceof PapyrusSyncTable))
+ continue;
+ data.add(proto);
+ }
+
+ // sort them
+ Collections.sort(data, new ViewPrototype.Comp());
+
+ // build the full labels
+ List<String> labels = new ArrayList<String>(data.size());
+ String last = null;
+ boolean first = true;
+ for (ViewPrototype item : data) {
+ String label = item.getLabel();
+ if (last != null && last.equals(label)) {
+ // name collision
+ if (first) {
+ labels.set(labels.size() - 1, data.get(labels.size() - 1).getFullLabel());
+ first = false;
+ }
+ labels.add(item.getFullLabel());
+ } else {
+ labels.add(label);
+ last = label;
+ first = true;
+ }
+ }
+
+ // build the menu
+ List<IContributionItem> items = new ArrayList<IContributionItem>(data.size());
+ for (int i = 0; i != data.size(); i++) {
+ final ViewPrototype proto = data.get(i);
+ String label = labels.get(i);
+ items.add(new ActionContributionItem(new Action(CREATE_MESSAGE + label, proto.getIconDescriptor()) {
+ @Override
+ public void run() {
+ proto.instantiateOn(selection);
+ }
+ }));
+ }
+ return items.toArray(new IContributionItem[items.size()]);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/PolicyDefinedTableHandler.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/PolicyDefinedTableHandler.java
new file mode 100755
index 00000000000..850517b770e
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/PolicyDefinedTableHandler.java
@@ -0,0 +1,78 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.common.handlers;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+
+/**
+ * Represents the handler for the creation of table defined in a viewpoint
+ * @author Laurent Wouters
+ */
+public class PolicyDefinedTableHandler extends CreateNatTableEditorHandler {
+ private URI configuration;
+ private EObject context;
+ private String name;
+
+ public PolicyDefinedTableHandler(URI config, EObject context, String name) {
+ this.configuration = config;
+ this.context = context;
+ this.name = name;
+ }
+
+ @Override
+ protected EObject getTableContext() {
+ return context;
+ }
+
+ @Override
+ protected URI getTableEditorConfigurationURI() {
+ return configuration;
+ }
+
+ public boolean execute(final ViewPrototype prototype) {
+ final String name = this.name != null ? this.name : askName();
+ if (name == null)
+ return false;
+ try {
+ final ServicesRegistry serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(context);
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+ domain.getCommandStack().execute(new RecordingCommand(domain) {
+ @Override
+ protected void doExecute() {
+ try {
+ Table table = PolicyDefinedTableHandler.this.doExecute(serviceRegistry, name, this.description);
+ table.setOwner(context);
+ table.setPrototype(prototype.getConfiguration());
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+ }
+ });
+ return true;
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ return false;
+ }
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/SyncTableCommandHelper.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/SyncTableCommandHelper.java
new file mode 100755
index 00000000000..6993609538c
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/SyncTableCommandHelper.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.common.helper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the command helper for the viewpoints application to synchronized tables
+ * @author Laurent Wouters
+ */
+public class SyncTableCommandHelper implements IViewTypeHelper {
+ /**
+ * ID of the extension point for Papyrus diagrams
+ */
+ private static final String EXTENSION_PAPYRUS_SYNC_TABLE = "org.eclipse.papyrus.infra.nattable.configuration";
+
+ /**
+ * The cache of implementations
+ */
+ private Map<String, String> implementations;
+
+ /**
+ * The cache of prototypes
+ */
+ private Map<PapyrusView, TableViewPrototype> cache;
+
+
+
+ @Override
+ public ViewPrototype getPrototypeFor(PapyrusView configuration) {
+ if (!(configuration instanceof PapyrusSyncTable))
+ return null;
+ if (implementations == null)
+ buildImplementationCache();
+ if (cache == null)
+ cache = new HashMap<PapyrusView, TableViewPrototype>();
+ if (cache.containsKey(configuration))
+ return cache.get(configuration);
+ if (!implementations.containsKey(configuration.getImplementationID()))
+ return null;
+ TableViewPrototype proto = new TableViewPrototype((PapyrusSyncTable)configuration, implementations.get(configuration.getImplementationID()));
+ cache.put(configuration, proto);
+ return proto;
+ }
+
+ @Override
+ public boolean isSupported(EClass type) {
+ return (type == ConfigurationPackage.eINSTANCE.getPapyrusSyncTable());
+ }
+
+ @Override
+ public boolean isSupported(EObject view) {
+ if (!(view instanceof Table))
+ return false;
+ Table table = (Table)view;
+ return (table.getPrototype() instanceof PapyrusSyncTable);
+ }
+
+ @Override
+ public ViewPrototype getPrototypeOf(EObject view) {
+ return getPrototypeFor((PapyrusView)((Table)view).getPrototype());
+ }
+
+ /**
+ * Builds the cache of sync table implementations
+ */
+ private void buildImplementationCache() {
+ implementations = new HashMap<String, String>();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_PAPYRUS_SYNC_TABLE);
+ IExtension[] extensions = point.getExtensions();
+ for (int i=0; i!=extensions.length; i++) {
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j=0; j!=elements.length; j++) {
+ if (elements[j].getName().equals("configuration")) {
+ String type = elements[j].getAttribute("type");
+ String file = elements[j].getAttribute("file");
+ if (!file.startsWith("platform:/"))
+ file = "platform:/plugin/" + extensions[i].getContributor().getName() + "/" + file;
+ if (!implementations.containsKey(type))
+ implementations.put(type, file);
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableCommandHelper.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableCommandHelper.java
new file mode 100755
index 00000000000..29fdab48711
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableCommandHelper.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.common.helper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+/**
+ * Represents the command helper for viewpoints-based generic tables
+ * @author Laurent Wouters
+ */
+public class TableCommandHelper implements IViewTypeHelper {
+
+ /**
+ * The cache of prototypes
+ */
+ private Map<PapyrusView, TableViewPrototype> cache;
+
+ @Override
+ public ViewPrototype getPrototypeFor(PapyrusView configuration) {
+ if (!(configuration instanceof PapyrusTable))
+ return null;
+ if (cache == null)
+ cache = new HashMap<PapyrusView, TableViewPrototype>();
+ if (cache.containsKey(configuration))
+ return cache.get(configuration);
+ TableViewPrototype proto = new TableViewPrototype((PapyrusTable)configuration);
+ cache.put(configuration, proto);
+ return proto;
+ }
+
+ @Override
+ public boolean isSupported(EClass type) {
+ return (type == ConfigurationPackage.eINSTANCE.getPapyrusTable());
+ }
+
+ @Override
+ public boolean isSupported(EObject view) {
+ if (!(view instanceof Table))
+ return false;
+ Table table = (Table)view;
+ return (table.getPrototype() instanceof PapyrusTable);
+ }
+
+ @Override
+ public ViewPrototype getPrototypeOf(EObject view) {
+ return getPrototypeFor((PapyrusView)((Table)view).getPrototype());
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java
new file mode 100755
index 00000000000..739ed4b040c
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/helper/TableViewPrototype.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.common.helper;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.common.handlers.PolicyDefinedTableHandler;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+
+
+/**
+ * Represents the prototype of a table defined in a viewpoint
+ * @author Laurent Wouters
+ */
+public class TableViewPrototype extends ViewPrototype {
+ private URI configFile;
+
+ public TableViewPrototype(PapyrusTable configuration) {
+ super(configuration);
+ configFile = URI.createURI(configuration.getConfiguration());
+ }
+
+ public TableViewPrototype(PapyrusSyncTable configuration, String file) {
+ super(configuration);
+ configFile = URI.createURI(file);
+ }
+
+ @Override
+ public boolean isOwnerReassignable() {
+ return true;
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner) {
+ return instantiateOn(owner, null);
+ }
+
+ @Override
+ public boolean instantiateOn(EObject owner, String name) {
+ if (configFile == null)
+ return false;
+ PolicyDefinedTableHandler handler = new PolicyDefinedTableHandler(configFile, owner, name);
+ return handler.execute(this);
+ }
+
+ @Override
+ public Command getCommandChangeOwner(EObject view, final EObject target) {
+ final Table table = (Table)view;
+ final EObject previous = table.getOwner();
+ return new AbstractCommand("Change table owner") {
+ @Override
+ public void execute() {
+ table.setOwner(target);
+ }
+ @Override
+ public void redo() {
+ table.setOwner(previous);
+ }
+ @Override
+ protected boolean prepare() { return true; }
+ };
+ }
+
+ @Override
+ public Command getCommandChangeRoot(EObject view, final EObject target) {
+ final Table table = (Table)view;
+ final EObject previous = table.getContext();
+ return new AbstractCommand("Change table root element") {
+ @Override
+ public void execute() {
+ table.setContext(target);
+ }
+ @Override
+ public void redo() {
+ table.setContext(previous);
+ }
+ @Override
+ protected boolean prepare() { return true; }
+ };
+ }
+
+ @Override
+ public EObject getOwnerOf(EObject view) {
+ return ((Table)view).getOwner();
+ }
+
+ @Override
+ public EObject getRootOf(EObject view) {
+ return ((Table)view).getContext();
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
index 3ae73ec801c..0157539f8c1 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
@@ -28,6 +28,9 @@
<details key="documentation" value="The context is used for two things : &#xD;&#xA;&lt;ul> &lt;li>&quot;virtual&quot; parent to display the table in the Papyrus Model Explorer &lt;/li>&#xD;&#xA;&lt;li>container of the objects created in the table&lt;/li>&#xD;&#xA;&lt;/ul> &#xD;&#xA;The context can't be null;"/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="prototype" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="tableConfiguration" lowerBound="1"
eType="#//nattableconfiguration/TableConfiguration">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java
index b5cdff2b4d7..deb5ac39691 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/NattablePackage.java
@@ -129,6 +129,24 @@ public interface NattablePackage extends EPackage {
int TABLE__CONTEXT = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE__OWNER = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Prototype</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TABLE__PROTOTYPE = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
* The feature id for the '<em><b>Table Configuration</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -136,7 +154,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__TABLE_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 1;
+ int TABLE__TABLE_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Invert Axis</b></em>' attribute.
@@ -146,7 +164,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__INVERT_AXIS = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 2;
+ int TABLE__INVERT_AXIS = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 4;
/**
* The feature id for the '<em><b>Column Axis Providers History</b></em>' containment reference list.
@@ -156,7 +174,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__COLUMN_AXIS_PROVIDERS_HISTORY = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 3;
+ int TABLE__COLUMN_AXIS_PROVIDERS_HISTORY = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 5;
/**
* The feature id for the '<em><b>Row Axis Providers History</b></em>' containment reference list.
@@ -166,7 +184,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__ROW_AXIS_PROVIDERS_HISTORY = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 4;
+ int TABLE__ROW_AXIS_PROVIDERS_HISTORY = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 6;
/**
* The feature id for the '<em><b>Local Row Header Axis Configuration</b></em>' containment reference.
@@ -176,7 +194,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 5;
+ int TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 7;
/**
* The feature id for the '<em><b>Local Column Header Axis Configuration</b></em>' containment reference.
@@ -186,7 +204,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 6;
+ int TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Current Row Axis Provider</b></em>' reference.
@@ -196,7 +214,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__CURRENT_ROW_AXIS_PROVIDER = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 7;
+ int TABLE__CURRENT_ROW_AXIS_PROVIDER = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>Current Column Axis Provider</b></em>' reference.
@@ -206,7 +224,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__CURRENT_COLUMN_AXIS_PROVIDER = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 8;
+ int TABLE__CURRENT_COLUMN_AXIS_PROVIDER = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 10;
/**
* The feature id for the '<em><b>Cells</b></em>' containment reference list.
@@ -216,7 +234,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE__CELLS = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 9;
+ int TABLE__CELLS = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 11;
/**
* The number of structural features of the '<em>Table</em>' class.
@@ -226,7 +244,7 @@ public interface NattablePackage extends EPackage {
* @generated
* @ordered
*/
- int TABLE_FEATURE_COUNT = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 10;
+ int TABLE_FEATURE_COUNT = NattableconfigurationPackage.TABLE_NAMED_ELEMENT_FEATURE_COUNT + 12;
/**
* The operation id for the '<em>Get EAnnotation</em>' operation.
@@ -273,8 +291,29 @@ public interface NattablePackage extends EPackage {
EReference getTable_Context();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getTableConfiguration
- * <em>Table Configuration</em>}'.
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getOwner <em>Owner</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Owner</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.Table#getOwner()
+ * @see #getTable()
+ * @generated
+ */
+ EReference getTable_Owner();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getPrototype <em>Prototype</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Prototype</em>'.
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.Table#getPrototype()
+ * @see #getTable()
+ * @generated
+ */
+ EReference getTable_Prototype();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getTableConfiguration <em>Table Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
@@ -437,6 +476,22 @@ public interface NattablePackage extends EPackage {
EReference TABLE__CONTEXT = eINSTANCE.getTable_Context();
/**
+ * The meta object literal for the '<em><b>Owner</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TABLE__OWNER = eINSTANCE.getTable_Owner();
+
+ /**
+ * The meta object literal for the '<em><b>Prototype</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TABLE__PROTOTYPE = eINSTANCE.getTable_Prototype();
+
+ /**
* The meta object literal for the '<em><b>Table Configuration</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java
index 0694ecb41f1..fca2385350f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/Table.java
@@ -38,18 +38,18 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.T
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getContext <em>Context</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getTableConfiguration <em>Table Configuration</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#isInvertAxis <em>Invert Axis</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getColumnAxisProvidersHistory <em>Column Axis Providers History</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getRowAxisProvidersHistory <em>Row Axis Providers History</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getLocalRowHeaderAxisConfiguration <em>Local Row Header Axis Configuration</em>}
- * </li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getLocalColumnHeaderAxisConfiguration <em>Local Column Header Axis Configuration
- * </em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCurrentRowAxisProvider <em>Current Row Axis Provider</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCurrentColumnAxisProvider <em>Current Column Axis Provider</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCells <em>Cells</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getContext <em>Context</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getPrototype <em>Prototype</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getTableConfiguration <em>Table Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#isInvertAxis <em>Invert Axis</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getColumnAxisProvidersHistory <em>Column Axis Providers History</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getRowAxisProvidersHistory <em>Row Axis Providers History</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getLocalRowHeaderAxisConfiguration <em>Local Row Header Axis Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getLocalColumnHeaderAxisConfiguration <em>Local Column Header Axis Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCurrentRowAxisProvider <em>Current Row Axis Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCurrentColumnAxisProvider <em>Current Column Axis Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getCells <em>Cells</em>}</li>
* </ul>
* </p>
*
@@ -95,6 +95,58 @@ public interface Table extends TableNamedElement {
void setContext(EObject value);
/**
+ * Returns the value of the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Owner</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Owner</em>' reference.
+ * @see #setOwner(EObject)
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage#getTable_Owner()
+ * @model required="true"
+ * @generated
+ */
+ EObject getOwner();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getOwner <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Owner</em>' reference.
+ * @see #getOwner()
+ * @generated
+ */
+ void setOwner(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Prototype</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Prototype</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Prototype</em>' reference.
+ * @see #setPrototype(EObject)
+ * @see org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage#getTable_Prototype()
+ * @model required="true"
+ * @generated
+ */
+ EObject getPrototype();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.Table#getPrototype <em>Prototype</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Prototype</em>' reference.
+ * @see #getPrototype()
+ * @generated
+ */
+ void setPrototype(EObject value);
+
+ /**
* Returns the value of the '<em><b>Table Configuration</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java
index ebd416ddfe4..637253097f6 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/NattablePackageImpl.java
@@ -196,18 +196,35 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
*
* @generated
*/
- public EReference getTable_TableConfiguration() {
+ public EReference getTable_Owner() {
return (EReference)tableEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @generated
+ */
+ public EReference getTable_Prototype() {
+ return (EReference)tableEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTable_TableConfiguration() {
+ return (EReference)tableEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public EAttribute getTable_InvertAxis() {
- return (EAttribute)tableEClass.getEStructuralFeatures().get(2);
+ return (EAttribute)tableEClass.getEStructuralFeatures().get(4);
}
/**
@@ -217,7 +234,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_ColumnAxisProvidersHistory() {
- return (EReference)tableEClass.getEStructuralFeatures().get(3);
+ return (EReference)tableEClass.getEStructuralFeatures().get(5);
}
/**
@@ -227,7 +244,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_RowAxisProvidersHistory() {
- return (EReference)tableEClass.getEStructuralFeatures().get(4);
+ return (EReference)tableEClass.getEStructuralFeatures().get(6);
}
/**
@@ -237,7 +254,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_LocalRowHeaderAxisConfiguration() {
- return (EReference)tableEClass.getEStructuralFeatures().get(5);
+ return (EReference)tableEClass.getEStructuralFeatures().get(7);
}
/**
@@ -247,7 +264,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_LocalColumnHeaderAxisConfiguration() {
- return (EReference)tableEClass.getEStructuralFeatures().get(6);
+ return (EReference)tableEClass.getEStructuralFeatures().get(8);
}
/**
@@ -257,7 +274,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_CurrentRowAxisProvider() {
- return (EReference)tableEClass.getEStructuralFeatures().get(7);
+ return (EReference)tableEClass.getEStructuralFeatures().get(9);
}
/**
@@ -267,7 +284,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_CurrentColumnAxisProvider() {
- return (EReference)tableEClass.getEStructuralFeatures().get(8);
+ return (EReference)tableEClass.getEStructuralFeatures().get(10);
}
/**
@@ -277,7 +294,7 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
* @generated
*/
public EReference getTable_Cells() {
- return (EReference)tableEClass.getEStructuralFeatures().get(9);
+ return (EReference)tableEClass.getEStructuralFeatures().get(11);
}
/**
@@ -314,6 +331,8 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
// Create classes and their features
tableEClass = createEClass(TABLE);
createEReference(tableEClass, TABLE__CONTEXT);
+ createEReference(tableEClass, TABLE__OWNER);
+ createEReference(tableEClass, TABLE__PROTOTYPE);
createEReference(tableEClass, TABLE__TABLE_CONFIGURATION);
createEAttribute(tableEClass, TABLE__INVERT_AXIS);
createEReference(tableEClass, TABLE__COLUMN_AXIS_PROVIDERS_HISTORY);
@@ -381,6 +400,8 @@ public class NattablePackageImpl extends EPackageImpl implements NattablePackage
// Initialize classes, features, and operations; add parameters
initEClass(tableEClass, Table.class, "Table", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(getTable_Context(), ecorePackage.getEObject(), null, "context", null, 1, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTable_Owner(), ecorePackage.getEObject(), null, "owner", null, 1, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTable_Prototype(), ecorePackage.getEObject(), null, "prototype", null, 1, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getTable_TableConfiguration(), theNattableconfigurationPackage.getTableConfiguration(), null, "tableConfiguration", null, 1, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEAttribute(getTable_InvertAxis(), ecorePackage.getEBoolean(), "invertAxis", "false", 1, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
initEReference(getTable_ColumnAxisProvidersHistory(), theNattableaxisproviderPackage.getAbstractAxisProvider(), null, "columnAxisProvidersHistory", null, 1, -1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java
index 91e14488181..30e3f6f3b03 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/impl/TableImpl.java
@@ -47,18 +47,18 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.i
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getContext <em>Context</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getTableConfiguration <em>Table Configuration</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#isInvertAxis <em>Invert Axis</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getColumnAxisProvidersHistory <em>Column Axis Providers History</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getRowAxisProvidersHistory <em>Row Axis Providers History</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getLocalRowHeaderAxisConfiguration <em>Local Row Header Axis
- * Configuration</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getLocalColumnHeaderAxisConfiguration <em>Local Column Header Axis
- * Configuration</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCurrentRowAxisProvider <em>Current Row Axis Provider</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCurrentColumnAxisProvider <em>Current Column Axis Provider</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCells <em>Cells</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getContext <em>Context</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getPrototype <em>Prototype</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getTableConfiguration <em>Table Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#isInvertAxis <em>Invert Axis</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getColumnAxisProvidersHistory <em>Column Axis Providers History</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getRowAxisProvidersHistory <em>Row Axis Providers History</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getLocalRowHeaderAxisConfiguration <em>Local Row Header Axis Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getLocalColumnHeaderAxisConfiguration <em>Local Column Header Axis Configuration</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCurrentRowAxisProvider <em>Current Row Axis Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCurrentColumnAxisProvider <em>Current Column Axis Provider</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.nattable.model.nattable.impl.TableImpl#getCells <em>Cells</em>}</li>
* </ul>
* </p>
*
@@ -78,6 +78,26 @@ public class TableImpl extends TableNamedElementImpl implements Table {
protected EObject context;
/**
+ * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOwner()
+ * @generated
+ * @ordered
+ */
+ protected EObject owner;
+
+ /**
+ * The cached value of the '{@link #getPrototype() <em>Prototype</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPrototype()
+ * @generated
+ * @ordered
+ */
+ protected EObject prototype;
+
+ /**
* The cached value of the '{@link #getTableConfiguration() <em>Table Configuration</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -253,7 +273,82 @@ public class TableImpl extends TableNamedElementImpl implements Table {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @generated
+ */
+ public EObject getOwner() {
+ if (owner != null && owner.eIsProxy()) {
+ InternalEObject oldOwner = (InternalEObject)owner;
+ owner = eResolveProxy(oldOwner);
+ if (owner != oldOwner) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, NattablePackage.TABLE__OWNER, oldOwner, owner));
+ }
+ }
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetOwner() {
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOwner(EObject newOwner) {
+ EObject oldOwner = owner;
+ owner = newOwner;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattablePackage.TABLE__OWNER, oldOwner, owner));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getPrototype() {
+ if (prototype != null && prototype.eIsProxy()) {
+ InternalEObject oldPrototype = (InternalEObject)prototype;
+ prototype = eResolveProxy(oldPrototype);
+ if (prototype != oldPrototype) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, NattablePackage.TABLE__PROTOTYPE, oldPrototype, prototype));
+ }
+ }
+ return prototype;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetPrototype() {
+ return prototype;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPrototype(EObject newPrototype) {
+ EObject oldPrototype = prototype;
+ prototype = newPrototype;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattablePackage.TABLE__PROTOTYPE, oldPrototype, prototype));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public TableConfiguration getTableConfiguration() {
@@ -564,35 +659,37 @@ public class TableImpl extends TableNamedElementImpl implements Table {
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case NattablePackage.TABLE__CONTEXT:
- if(resolve)
- return getContext();
- return basicGetContext();
- case NattablePackage.TABLE__TABLE_CONFIGURATION:
- if(resolve)
- return getTableConfiguration();
- return basicGetTableConfiguration();
- case NattablePackage.TABLE__INVERT_AXIS:
- return isInvertAxis();
- case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
- return getColumnAxisProvidersHistory();
- case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
- return getRowAxisProvidersHistory();
- case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
- return getLocalRowHeaderAxisConfiguration();
- case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
- return getLocalColumnHeaderAxisConfiguration();
- case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
- if(resolve)
- return getCurrentRowAxisProvider();
- return basicGetCurrentRowAxisProvider();
- case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
- if(resolve)
- return getCurrentColumnAxisProvider();
- return basicGetCurrentColumnAxisProvider();
- case NattablePackage.TABLE__CELLS:
- return getCells();
+ switch (featureID) {
+ case NattablePackage.TABLE__CONTEXT:
+ if (resolve) return getContext();
+ return basicGetContext();
+ case NattablePackage.TABLE__OWNER:
+ if (resolve) return getOwner();
+ return basicGetOwner();
+ case NattablePackage.TABLE__PROTOTYPE:
+ if (resolve) return getPrototype();
+ return basicGetPrototype();
+ case NattablePackage.TABLE__TABLE_CONFIGURATION:
+ if (resolve) return getTableConfiguration();
+ return basicGetTableConfiguration();
+ case NattablePackage.TABLE__INVERT_AXIS:
+ return isInvertAxis();
+ case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
+ return getColumnAxisProvidersHistory();
+ case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
+ return getRowAxisProvidersHistory();
+ case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
+ return getLocalRowHeaderAxisConfiguration();
+ case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
+ return getLocalColumnHeaderAxisConfiguration();
+ case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
+ if (resolve) return getCurrentRowAxisProvider();
+ return basicGetCurrentRowAxisProvider();
+ case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
+ if (resolve) return getCurrentColumnAxisProvider();
+ return basicGetCurrentColumnAxisProvider();
+ case NattablePackage.TABLE__CELLS:
+ return getCells();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -606,40 +703,46 @@ public class TableImpl extends TableNamedElementImpl implements Table {
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case NattablePackage.TABLE__CONTEXT:
- setContext((EObject)newValue);
- return;
- case NattablePackage.TABLE__TABLE_CONFIGURATION:
- setTableConfiguration((TableConfiguration)newValue);
- return;
- case NattablePackage.TABLE__INVERT_AXIS:
- setInvertAxis((Boolean)newValue);
- return;
- case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
- getColumnAxisProvidersHistory().clear();
- getColumnAxisProvidersHistory().addAll((Collection<? extends AbstractAxisProvider>)newValue);
- return;
- case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
- getRowAxisProvidersHistory().clear();
- getRowAxisProvidersHistory().addAll((Collection<? extends AbstractAxisProvider>)newValue);
- return;
- case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
- setLocalRowHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)newValue);
- return;
- case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
- setLocalColumnHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)newValue);
- return;
- case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
- setCurrentRowAxisProvider((AbstractAxisProvider)newValue);
- return;
- case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
- setCurrentColumnAxisProvider((AbstractAxisProvider)newValue);
- return;
- case NattablePackage.TABLE__CELLS:
- getCells().clear();
- getCells().addAll((Collection<? extends Cell>)newValue);
- return;
+ switch (featureID) {
+ case NattablePackage.TABLE__CONTEXT:
+ setContext((EObject)newValue);
+ return;
+ case NattablePackage.TABLE__OWNER:
+ setOwner((EObject)newValue);
+ return;
+ case NattablePackage.TABLE__PROTOTYPE:
+ setPrototype((EObject)newValue);
+ return;
+ case NattablePackage.TABLE__TABLE_CONFIGURATION:
+ setTableConfiguration((TableConfiguration)newValue);
+ return;
+ case NattablePackage.TABLE__INVERT_AXIS:
+ setInvertAxis((Boolean)newValue);
+ return;
+ case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
+ getColumnAxisProvidersHistory().clear();
+ getColumnAxisProvidersHistory().addAll((Collection<? extends AbstractAxisProvider>)newValue);
+ return;
+ case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
+ getRowAxisProvidersHistory().clear();
+ getRowAxisProvidersHistory().addAll((Collection<? extends AbstractAxisProvider>)newValue);
+ return;
+ case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
+ setLocalRowHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)newValue);
+ return;
+ case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
+ setLocalColumnHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)newValue);
+ return;
+ case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
+ setCurrentRowAxisProvider((AbstractAxisProvider)newValue);
+ return;
+ case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
+ setCurrentColumnAxisProvider((AbstractAxisProvider)newValue);
+ return;
+ case NattablePackage.TABLE__CELLS:
+ getCells().clear();
+ getCells().addAll((Collection<? extends Cell>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -652,37 +755,43 @@ public class TableImpl extends TableNamedElementImpl implements Table {
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case NattablePackage.TABLE__CONTEXT:
- setContext((EObject)null);
- return;
- case NattablePackage.TABLE__TABLE_CONFIGURATION:
- setTableConfiguration((TableConfiguration)null);
- return;
- case NattablePackage.TABLE__INVERT_AXIS:
- setInvertAxis(INVERT_AXIS_EDEFAULT);
- return;
- case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
- getColumnAxisProvidersHistory().clear();
- return;
- case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
- getRowAxisProvidersHistory().clear();
- return;
- case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
- setLocalRowHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)null);
- return;
- case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
- setLocalColumnHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)null);
- return;
- case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
- setCurrentRowAxisProvider((AbstractAxisProvider)null);
- return;
- case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
- setCurrentColumnAxisProvider((AbstractAxisProvider)null);
- return;
- case NattablePackage.TABLE__CELLS:
- getCells().clear();
- return;
+ switch (featureID) {
+ case NattablePackage.TABLE__CONTEXT:
+ setContext((EObject)null);
+ return;
+ case NattablePackage.TABLE__OWNER:
+ setOwner((EObject)null);
+ return;
+ case NattablePackage.TABLE__PROTOTYPE:
+ setPrototype((EObject)null);
+ return;
+ case NattablePackage.TABLE__TABLE_CONFIGURATION:
+ setTableConfiguration((TableConfiguration)null);
+ return;
+ case NattablePackage.TABLE__INVERT_AXIS:
+ setInvertAxis(INVERT_AXIS_EDEFAULT);
+ return;
+ case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
+ getColumnAxisProvidersHistory().clear();
+ return;
+ case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
+ getRowAxisProvidersHistory().clear();
+ return;
+ case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
+ setLocalRowHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)null);
+ return;
+ case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
+ setLocalColumnHeaderAxisConfiguration((LocalTableHeaderAxisConfiguration)null);
+ return;
+ case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
+ setCurrentRowAxisProvider((AbstractAxisProvider)null);
+ return;
+ case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
+ setCurrentColumnAxisProvider((AbstractAxisProvider)null);
+ return;
+ case NattablePackage.TABLE__CELLS:
+ getCells().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -695,27 +804,31 @@ public class TableImpl extends TableNamedElementImpl implements Table {
*/
@Override
public boolean eIsSet(int featureID) {
- switch(featureID) {
- case NattablePackage.TABLE__CONTEXT:
- return context != null;
- case NattablePackage.TABLE__TABLE_CONFIGURATION:
- return tableConfiguration != null;
- case NattablePackage.TABLE__INVERT_AXIS:
- return invertAxis != INVERT_AXIS_EDEFAULT;
- case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
- return columnAxisProvidersHistory != null && !columnAxisProvidersHistory.isEmpty();
- case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
- return rowAxisProvidersHistory != null && !rowAxisProvidersHistory.isEmpty();
- case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
- return localRowHeaderAxisConfiguration != null;
- case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
- return localColumnHeaderAxisConfiguration != null;
- case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
- return currentRowAxisProvider != null;
- case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
- return currentColumnAxisProvider != null;
- case NattablePackage.TABLE__CELLS:
- return cells != null && !cells.isEmpty();
+ switch (featureID) {
+ case NattablePackage.TABLE__CONTEXT:
+ return context != null;
+ case NattablePackage.TABLE__OWNER:
+ return owner != null;
+ case NattablePackage.TABLE__PROTOTYPE:
+ return prototype != null;
+ case NattablePackage.TABLE__TABLE_CONFIGURATION:
+ return tableConfiguration != null;
+ case NattablePackage.TABLE__INVERT_AXIS:
+ return invertAxis != INVERT_AXIS_EDEFAULT;
+ case NattablePackage.TABLE__COLUMN_AXIS_PROVIDERS_HISTORY:
+ return columnAxisProvidersHistory != null && !columnAxisProvidersHistory.isEmpty();
+ case NattablePackage.TABLE__ROW_AXIS_PROVIDERS_HISTORY:
+ return rowAxisProvidersHistory != null && !rowAxisProvidersHistory.isEmpty();
+ case NattablePackage.TABLE__LOCAL_ROW_HEADER_AXIS_CONFIGURATION:
+ return localRowHeaderAxisConfiguration != null;
+ case NattablePackage.TABLE__LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION:
+ return localColumnHeaderAxisConfiguration != null;
+ case NattablePackage.TABLE__CURRENT_ROW_AXIS_PROVIDER:
+ return currentRowAxisProvider != null;
+ case NattablePackage.TABLE__CURRENT_COLUMN_AXIS_PROVIDER:
+ return currentColumnAxisProvider != null;
+ case NattablePackage.TABLE__CELLS:
+ return cells != null && !cells.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
index e5016117c69..40fa0e961b7 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
@@ -12,7 +12,14 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.gmf.runtime.emf.type.core,
- org.eclipse.core.expressions
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.emf.facet.query.java.core,
+ org.eclipse.papyrus.emf.facet.efacet,
+ org.eclipse.papyrus.emf.facet.efacet.metamodel,
+ org.eclipse.papyrus.emf.facet.custom.metamodel,
+ org.eclipse.papyrus.emf.facet.util.emf.ui,
+ org.eclipse.papyrus.emf.facet.custom.ui
Export-Package: org.eclipse.papyrus.infra.nattable.modelexplorer,
org.eclipse.papyrus.infra.nattable.modelexplorer.handlers,
org.eclipse.papyrus.infra.nattable.modelexplorer.messages,
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/plugin.xml
index 67dca5e4697..917ae285f4c 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/plugin.xml
@@ -1,21 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <!-- TODO: EMF-FACET update uicustom and queries
- <extension point="org.eclipse.papyrus.emf.facet.infra.query.registration">
- <modelqueryset file="resources/PapyrusTablesFacet.querySet">
- </modelqueryset>
+ <extension point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
+ <modeldeclaration file="resources/PapyrusTable.custom"/>
</extension>
- <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/PapyrusTables.uiCustom" loadByDefault="true"/>
- </extension>
- <extension point="org.eclipse.papyrus.emf.facet.infra.browser.custom.core.registration">
- <browserCustomization file="resources/PapyrusTablesFacet.uiCustom" loadByDefault="true"/>
- </extension>
- <extension point="org.eclipse.papyrus.emf.facet.infra.facet.registration">
- <facetset file="resources/PapyrusTablesFacet.facetSet">
- </facetset>
- </extension-->
<extension point="org.eclipse.ui.handlers">
<handler class="org.eclipse.papyrus.infra.nattable.modelexplorer.handlers.RenameTableHandler" commandId="org.eclipse.ui.edit.rename">
<activeWhen>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTable.custom b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTable.custom
new file mode 100755
index 00000000000..591f2c9a5c1
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTable.custom
@@ -0,0 +1,49 @@
+<?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" xmlns:query="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet/query" name="PapyrusTable" documentation="Display contained table and their icons" mustBeLoadedByDefault="true">
+ <eClassifiers xsi:type="custom:EClassCustomization" name="Table" documentation="Representation of table in model explorer">
+ <extendedMetaclass href="http://www.eclipse.org/papyrus/nattable/model#//Table"/>
+ <facetOperations name="GetTableIcon" documentation="Return the path to the icon of the corresponding table">
+ <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>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.GetTableIcon"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ </facetOperations>
+ <facetOperations name="NotVisibleStructuralFeature">
+ <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>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.NotVisibleStructuralFeatureQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ </facetOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="custom:EClassCustomization" name="EObject" documentation="representation around EObject displayed in model explorer">
+ <extendedMetaclass href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <facetElements xsi:type="efacet:FacetReference" name="tables" upperBound="-1" defaultValueLiteral="" derived="true">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/nattable/model#//Table"/>
+ <query xsi:type="query:OperationCallQuery" operation="//EObject/TablesRefContent"/>
+ </facetElements>
+ <facetOperations name="TablesRefVisibility" documentation="Return true if the element contains tables">
+ <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>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.IsTableContainer"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ </facetOperations>
+ <facetOperations name="TablesRefContent" upperBound="-1" documentation="Get the collection of all contained tables">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/nattable/model#//Table"/>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.GetContainedTables"/>
+ </facetOperations>
+ <facetOperations name="TablesRefCollapse">
+ <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>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.TablesRefCollapseQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ </eClassifiers>
+</custom:Customization>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTables.uiCustom b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTables.uiCustom
deleted file mode 100644
index 06f1cb76e98..00000000000
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTables.uiCustom
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8"
- metamodelURI="http://www.eclipse.org/papyrus/nattable/model">
- <types metaclassName="nattable.Table">
- <references referenceName="context">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="eAnnotations">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="tableConfiguration">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="columnAxisProvidersHistory">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="rowAxisProvidersHistory">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="localRowHeaderAxisConfiguration">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="localColumnHeaderAxisConfiguration">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="currentColumnAxisProvider">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="currentRowAxisProvider">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- <references referenceName="cells">
- <customizedFeatures>
- <defaultValue xsi:type="uicustom:StaticFeatureValue"
- value="false" />
- </customizedFeatures>
- </references>
- </types>
-</uicustom:MetamodelView>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.facetSet b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.facetSet
deleted file mode 100644
index bbca3816dbc..00000000000
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.facetSet
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<facet:FacetSet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:facet="http://www.eclipse.org/EmfFacet/infra/facet/0.8.incubation" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="PapyrusTablesFacet" nsURI="http://org.eclipse.org/papyrus/tables/modelExplorer/Facet" nsPrefix="PapyrusTablesFacet">
- <eClassifiers xsi:type="facet:Facet" name="TableContainer" abstract="true">
- <eSuperTypes href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <eStructuralFeatures xsi:type="facet:FacetReference" name="tables" upperBound="-1" volatile="true" unsettable="true">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/nattable/model#//Table"/>
- <valueQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/PapyrusTablesFacet#GetContainedTables"></valueQuery>
- </eStructuralFeatures>
- <conditionQuery xsi:type="query:JavaModelQuery" href="emffacet:/query/PapyrusTablesFacet#IsTableContainer"/>
- </eClassifiers>
- <extendedPackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
-</facet:FacetSet>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.querySet b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.querySet
deleted file mode 100644
index 2b220c97629..00000000000
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.querySet
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="PapyrusTablesFacet" description="A set of queries to manage the tables in the ModelExplorer">
- <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
- <associatedMetamodels href="http://www.eclipse.org/papyrus/nattable/model#/"/>
- <queries xsi:type="query:JavaModelQuery" name="IsTableContainer" description="Return true if the element contains tables" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.IsTableContainer">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="GetContainedTables" description="Get the collection of all contained tables" upperBound="-1" implementationClassName="org.eclipse.papyrus.infra.nattable.modelexplorer.queries.GetContainedTables">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/papyrus/nattable/model#//Table"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </queries>
-</query:ModelQuerySet>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.uiCustom b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.uiCustom
deleted file mode 100644
index 4149fcb9fe5..00000000000
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/resources/PapyrusTablesFacet.uiCustom
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<uicustom:MetamodelView xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8" metamodelURI="http://org.eclipse.org/papyrus/tables/modelExplorer/Facet">
- <types metaclassName="PapyrusTablesFacet.TableContainer">
- <references referenceName="tables">
- <customizedFeatures>
- <valueCases>
- <value xsi:type="uicustom:StaticFeatureValue" value="false"/>
- <condition xsi:type="query:JavaModelQuery" href="emffacet:/query/PapyrusTablesFacet#IsTableContainer"/>
- </valueCases>
- <defaultValue xsi:type="uicustom:StaticFeatureValue" value="false"/>
- </customizedFeatures>
- <customizedFeatures customizedFeature="collapseLink">
- <defaultValue xsi:type="uicustom:StaticFeatureValue" value="true"/>
- </customizedFeatures>
- </references>
- </types>
-</uicustom:MetamodelView>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
index b493d924f04..23bef143690 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetContainedTables.java
@@ -11,28 +11,39 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.modelexplorer.queries;
-//TODO: EMF-FACET update query
-/** Get the collection of all contained tables */
-public class GetContainedTables {/*
- extends AbstractEditorContainerQuery implements IJavaModelQuery<EObject, Collection<Table>> {
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+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.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractEditorContainerQuery;
+/** Get the collection of all contained tables */
+public class GetContainedTables extends AbstractEditorContainerQuery implements IJavaQuery2<EObject, Collection<Table>> {
- @Override
- public Collection<Table> evaluate(final EObject context, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ public Collection<Table> evaluate(EObject source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
List<Table> result = new ArrayList<Table>();
- Iterator<EObject> roots = NavigatorUtils.getNotationRoots(context);
+ Iterator<EObject> roots = NavigatorUtils.getNotationRoots(source);
if(roots == null) {
return result;
}
while(roots.hasNext()) {
EObject root = roots.next();
- if(root instanceof Table) {
- if(EcoreUtil.equals(((Table)root).getContext(), context)) {
- result.add((Table)root);
+ if (root instanceof Table) {
+ if (EcoreUtil.equals(((Table) root).getOwner(), source)) {
+ result.add((Table) root);
}
}
}
return result;
- }**/
-}
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetTableIcon.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetTableIcon.java
new file mode 100755
index 00000000000..56ebeb5a228
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/GetTableIcon.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.modelexplorer.queries;
+
+import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage;
+import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils;
+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.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractGetEditorIconQuery;
+
+/** Return the path to the icon of the corresponding table */
+public class GetTableIcon extends AbstractGetEditorIconQuery implements IJavaQuery2<Table, IImage> {
+
+ public IImage evaluate(Table source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ ViewPrototype prototype = ViewPrototype.get((PapyrusView) source.getPrototype());
+ return ImageUtils.wrap(prototype.getIconURI());
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
index 25b549ed7ca..f878ddf7ba4 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/IsTableContainer.java
@@ -1,42 +1,58 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+/**
+ * Copyright (c) 2011 Atos.
+ *
+ * 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:
+ * Atos - Initial API and implementation
*
- * 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:
- * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation
- *****************************************************************************/
+ */
package org.eclipse.papyrus.infra.nattable.modelexplorer.queries;
import java.util.Iterator;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
+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.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.views.modelexplorer.NavigatorUtils;
-//TODO: EMF-FACET update query
-public class IsTableContainer {/*extends AbstractEditorContainerQuery implements IJavaModelQuery<EObject, Boolean> {
-*/
+import org.eclipse.papyrus.views.modelexplorer.queries.AbstractEditorContainerQuery;
+
+public class IsTableContainer extends AbstractEditorContainerQuery implements IJavaQuery2<EObject, Boolean> {
+
/**
- * Return true if the element is a Diagram Container
+ * Return true if the element is a Table Container
*/
- /*@Override
- public Boolean evaluate(final EObject context, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- Iterator<EObject> roots = NavigatorUtils.getNotationRoots(context);
- if(roots == null) {
- return false;
- }
- while(roots.hasNext()) {
- EObject root = roots.next();
- if(root instanceof Table) {
- if(EcoreUtil.equals(((Table)root).getContext(), context)) {
- return true;
+
+ public Boolean evaluate(EObject source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ ParameterValue parameterValue = (ParameterValue) parameterValues.getParameterValueByName("eStructuralFeature");
+ EStructuralFeature eStructuralFeature = (EStructuralFeature) parameterValue.getValue();
+ if ((eStructuralFeature instanceof FacetReference) && ("diagrams".equals((eStructuralFeature).getName()))) {
+
+ Iterator<EObject> roots = NavigatorUtils.getNotationRoots(source);
+ if (roots == null) {
+ return false;
+ }
+
+ while (roots.hasNext()) {
+ EObject root = roots.next();
+ if (root instanceof Table) {
+ if (EcoreUtil.equals(((Table) root).getOwner(), source)) {
+ return true;
+ }
}
}
+ return false;
}
- return false;
- }*/
-}
+ return true;
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/NotVisibleStructuralFeatureQuery.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/NotVisibleStructuralFeatureQuery.java
new file mode 100755
index 00000000000..bcc10cbf657
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/NotVisibleStructuralFeatureQuery.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.modelexplorer.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.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.infra.nattable.model.nattable.Table;
+
+public class NotVisibleStructuralFeatureQuery implements IJavaQuery2<Table, Boolean> {
+ public Boolean evaluate(final Table context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+ ParameterValue parameterValue= (ParameterValue)parameterValues.getParameterValueByName("eStructuralFeature");
+ EStructuralFeature eStructuralFeature=(EStructuralFeature)parameterValue.getValue();
+ //if eStructural feature ==null this is root model explorer.
+ //border effect of this kind of queries
+ if (eStructuralFeature==null){
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/TablesRefCollapseQuery.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/TablesRefCollapseQuery.java
new file mode 100755
index 00000000000..6560c8c3a64
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/src/org/eclipse/papyrus/infra/nattable/modelexplorer/queries/TablesRefCollapseQuery.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.modelexplorer.queries;
+
+import org.eclipse.emf.ecore.EObject;
+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;
+
+public class TablesRefCollapseQuery implements IJavaQuery2<EObject, Boolean> {
+ public Boolean evaluate(final EObject context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+ ParameterValue parameterValue= (ParameterValue)parameterValues.getParameterValueByName("eStructuralFeature");
+ EStructuralFeature eStructuralFeature=(EStructuralFeature)parameterValue.getValue();
+ if((eStructuralFeature instanceof FacetReference)&&("diagrams".equals((eStructuralFeature).getName()))){
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
index d81c9ac5b1d..0915962a3f9 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
org.eclipse.nebula.widgets.nattable.core;bundle-version="1.0.0",
org.eclipse.emf.databinding,
- org.eclipse.core.databinding.property;bundle-version="1.4.200"
+ org.eclipse.core.databinding.property;bundle-version="1.4.200",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.infra.nattable.properties.constrai
nts
Bundle-Vendor: %Bundle-Vendor
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTable.xwt b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTable.xwt
index 59f4909fe18..a992fe52044 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTable.xwt
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTable.xwt
@@ -12,12 +12,10 @@
</Composite.layout>
<ppe:StringEditor input="{Binding}"
property="nattable:nattableconfiguration:TableNamedElement:name"></ppe:StringEditor>
- <ppe:ReferenceLabel input="{Binding}" property="nattable:Table:context"
- readOnly="true"></ppe:ReferenceLabel>
+ <ppe:ReferenceLabel input="{Binding}" property="nattable:Table:prototype" readOnly="true" customLabel="View Type"></ppe:ReferenceLabel>
+ <ppe:ReferenceLabel input="{Binding}" property="nattable:Table:owner" readOnly="true" customLabel="Owner"></ppe:ReferenceLabel>
+ <ppe:ReferenceDialog input="{Binding}" property="nattable:Table:context" customLabel="Root element"></ppe:ReferenceDialog>
<ppe:BooleanRadio input="{Binding}" property="nattable:Table:invertAxis"></ppe:BooleanRadio>
- <ppe:StringEditor input="{Binding}"
- property="nattable:Table:tableConfiguration.type" readOnly="true"
- customLabel="Type"></ppe:StringEditor>
</Composite>
<Composite>
<Composite.layout>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
index 65c431481cb..00ec6b126ea 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/modelelement/NatTableModelElement.java
@@ -23,8 +23,11 @@ import org.eclipse.core.databinding.observable.IObservable;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
@@ -67,13 +70,17 @@ import org.eclipse.papyrus.infra.nattable.properties.observable.RowPasteObjectPo
import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnContainmentFeatureContentProvider;
import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnElementTypeIdContentProvider;
import org.eclipse.papyrus.infra.nattable.properties.provider.ColumnPostActionIdsProvider;
+import org.eclipse.papyrus.infra.nattable.properties.provider.ContextFeatureContentProvider;
import org.eclipse.papyrus.infra.nattable.properties.provider.RowContainmentFeatureContentProvider;
import org.eclipse.papyrus.infra.nattable.properties.provider.RowElementTypeIdContentProvider;
import org.eclipse.papyrus.infra.nattable.properties.provider.RowPostActionIdsProvider;
import org.eclipse.papyrus.infra.nattable.properties.utils.Constants;
import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
@@ -143,6 +150,9 @@ public class NatTableModelElement extends EMFModelElement {
tableModelManager = new NattableModelManager(getEditedTable());
this.observableValues = new HashMap<String, IObservable>();
this.interestingFeatures = new ArrayList<EStructuralFeature>();
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Prototype());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Owner());
+ interestingFeatures.add(NattablePackage.eINSTANCE.getTable_Context());
interestingFeatures.add(NattablePackage.eINSTANCE.getTable_InvertAxis());
interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalColumnHeaderAxisConfiguration());
interestingFeatures.add(NattablePackage.eINSTANCE.getTable_LocalRowHeaderAxisConfiguration());
@@ -505,7 +515,10 @@ public class NatTableModelElement extends EMFModelElement {
@Override
public IStaticContentProvider getContentProvider(String propertyPath) {
IStaticContentProvider provider = null;
- if(Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
+ if(Constants.TABLE_CONTEXT.equals(propertyPath)) {
+ Table table = getEditedTable();
+ provider = new ContextFeatureContentProvider(table, getRoot(table.getContext()));
+ } else if(Constants.ROW_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
provider = new RowContainmentFeatureContentProvider(getEditedTable());
} else if(Constants.COLUMN_PASTED_EOBJECT_CONTAINMENT_FEATURE.equals(propertyPath)) {
provider = new ColumnContainmentFeatureContentProvider(getEditedTable());
@@ -558,4 +571,39 @@ public class NatTableModelElement extends EMFModelElement {
return super.isOrdered(propertyPath);
}
+ @Override
+ public ILabelProvider getLabelProvider(String propertyPath) {
+ if (propertyPath.endsWith("prototype")) {
+ return new ILabelProvider() {
+ public void addListener(ILabelProviderListener listener) { }
+ public void removeListener(ILabelProviderListener listener) { }
+ public void dispose() { }
+ public boolean isLabelProperty(Object element, String property) { return false; }
+ public Image getImage(Object element) {
+ ViewPrototype proto = ViewPrototype.get((PapyrusView)element);
+ return proto.getIcon();
+ }
+ public String getText(Object element) {
+ ViewPrototype proto = ViewPrototype.get((PapyrusView)element);
+ return proto.getQualifiedName();
+ }
+ };
+ }
+ return super.getLabelProvider(propertyPath);
+ }
+
+ /**
+ * Gets the root EObject from the given one
+ * @param obj An object
+ * @return The root object which is an ancestor of the given one
+ */
+ private EObject getRoot(EObject obj) {
+ EObject current = obj;
+ EObject parent = obj.eContainer();
+ while (parent != null) {
+ current = parent;
+ parent = parent.eContainer();
+ }
+ return current;
+ }
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ContextFeatureContentProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ContextFeatureContentProvider.java
new file mode 100755
index 00000000000..52b64030bb6
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/provider/ContextFeatureContentProvider.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.properties.provider;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ui.ECoreModelContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * Represents a simple ECore model content provider for the selection of a table's root model element
+ * @author Laurent Wouters
+ */
+public class ContextFeatureContentProvider extends ECoreModelContentProvider implements IStaticContentProvider, IHierarchicContentProvider {
+ /**
+ * The diagram
+ */
+ private Table table;
+
+ /**
+ * Initializes the provider with the given root
+ * @param diagram The diagram for which a root model element is to be provided
+ * @param root The root object
+ */
+ public ContextFeatureContentProvider(Table table, EObject root) {
+ super(root);
+ this.table = table;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider#getElements()
+ */
+ public Object[] getElements() {
+ return getElements(null);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider#isValidValue(java.lang.Object)
+ */
+ public boolean isValidValue(Object element) {
+ if (element == null)
+ return false;
+ if (!(element instanceof EObject))
+ return false;
+ ViewPrototype prototype = ViewPrototype.get((PapyrusView)table.getPrototype());
+ if (prototype == null)
+ return false;
+ return PolicyChecker.getCurrent().canHaveNewView((EObject)element, table.getOwner(), prototype);
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
index 8d2e7a4e390..a8ebc6dcc30 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/src/org/eclipse/papyrus/infra/nattable/properties/utils/Constants.java
@@ -25,6 +25,8 @@ public class Constants {
//to prevent instanciation
}
+
+ public static final String TABLE_CONTEXT = "context"; //$NON-NLS-1$
public static final String LOCAL_COLUMN_HEADER_AXIS_CONFIGURATION_DISPLAY_LABEL = "localColumnHeaderAxisConfiguration.displayLabel"; //$NON-NLS-1$
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml
index e6fc4ce7a79..27149ed7454 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/plugin.xml
@@ -50,7 +50,8 @@
<extension
point="org.eclipse.papyrus.infra.nattable.configuration">
<configuration
- file="resources/viewpage.nattableconfiguration">
+ file="resources/viewpage.nattableconfiguration"
+ type="PapyrusViewsTable">
</configuration>
</extension>
</plugin>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/plugin.xml
index 452a5493cef..64e206fa600 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor/plugin.xml
@@ -60,59 +60,6 @@
</handler>
</extension>
<extension
- id="create.table.menus"
- name="Create Table Menus"
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.infra.nattable.popupmenu.createnattable">
- <command
- commandId="org.eclipse.papyrus.infra.nattable.page.editor.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.papyrus.infra.nattable.menu.createnattable">
- <command
- commandId="org.eclipse.papyrus.infra.nattable.page.editor.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.papyrus.infra.nattable.toolbar.createnattable">
- <command
- commandId="org.eclipse.papyrus.infra.nattable.page.editor.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
point="org.eclipse.ui.commandImages">
<image
commandId="org.eclipse.papyrus.infra.nattable.page.editor.create.command"
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd
index 6aa249e6641..e2551c85634 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/schema/org.eclipse.papyrus.infra.nattable.configuration.exsd
@@ -64,6 +64,13 @@
</appinfo>
</annotation>
</attribute>
+ <attribute name="type" type="string" use="required">
+ <annotation>
+ <documentation>
+ The unique type identifier of the table as a string
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF
index f0b94ae6f9f..f82fa9011f4 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.emf.transaction,
org.eclipse.gef,
+ org.eclipse.gmf.runtime.notation.edit,
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.eclipse.ui,
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.classpath
index 59cf3977c7e..2d1a4302f04 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.classpath
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.classpath
@@ -1,8 +1,7 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.project
new file mode 100755
index 00000000000..0e3aaf843fb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.configuration.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.settings/org.eclipse.jdt.core.prefs
index eeb9600f461..44217f8c068 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,7 @@
-#Tue Feb 08 14:54:16 CET 2011
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..29a1b9941f0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuration.edit;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.provider.ConfigurationEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.edit,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010.edit;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/about.html
index d35d5aed64c..dd02e0be168 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/about.html
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/build.properties
new file mode 100755
index 00000000000..9811208ae02
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/build.properties
@@ -0,0 +1,12 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png
new file mode 100755
index 00000000000..298c65024cb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png
new file mode 100755
index 00000000000..8e4881ab36f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png
new file mode 100755
index 00000000000..9cbe852aee8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png
new file mode 100755
index 00000000000..3be5941ebc8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png
new file mode 100755
index 00000000000..f8826cd1b04
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ChildRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ChildRule.png
new file mode 100755
index 00000000000..f521e24194f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ChildRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ElementImport.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ElementImport.png
new file mode 100755
index 00000000000..4874c9a4bda
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ElementImport.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png
new file mode 100755
index 00000000000..b2ed7ef1f5c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png
new file mode 100755
index 00000000000..b24525e0564
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PaletteRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PaletteRule.png
new file mode 100755
index 00000000000..702ce3268db
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PaletteRule.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusConfiguration.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusConfiguration.png
new file mode 100755
index 00000000000..3b2678c6fc5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusConfiguration.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusDiagram.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusDiagram.png
new file mode 100755
index 00000000000..84904512460
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusDiagram.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusSyncTable.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusSyncTable.png
new file mode 100755
index 00000000000..e8e0a707a3c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusSyncTable.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusTable.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusTable.png
new file mode 100755
index 00000000000..0130d061f42
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusTable.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png
new file mode 100755
index 00000000000..6a02a48333d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png
new file mode 100755
index 00000000000..a4674477cc9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PathElement.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PathElement.png
new file mode 100755
index 00000000000..fbf0306e6f0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PathElement.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties
new file mode 100755
index 00000000000..6c33b907a74
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties
@@ -0,0 +1,91 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Configuration - Edit (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_PapyrusConfiguration_type = Papyrus Configuration
+_UI_PapyrusViewpoint_type = Papyrus Viewpoint
+_UI_PapyrusView_type = Papyrus View
+_UI_PapyrusDiagram_type = Papyrus Diagram
+_UI_DiagramCreationRule_type = Diagram Creation Rule
+_UI_ModelRule_type = Model Rule
+_UI_PaletteRule_type = Palette Rule
+_UI_Rule_type = Rule
+_UI_PathElement_type = Path Element
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_PapyrusConfiguration_defaultStakeholder_feature = Default Stakeholder
+_UI_PapyrusConfiguration_metamodel_feature = Metamodel
+_UI_PapyrusViewpoint_parent_feature = Parent
+_UI_PapyrusDiagram_creationRules_feature = Creation Rules
+_UI_PapyrusDiagram_modelRules_feature = Model Rules
+_UI_PapyrusDiagram_paletteRules_feature = Palette Rules
+_UI_DiagramCreationRule_element_feature = Element
+_UI_DiagramCreationRule_multiplicity_feature = Multiplicity
+_UI_ModelRule_element_feature = Element
+_UI_ModelRule_origin_feature = Origin
+_UI_ModelRule_insertionPath_feature = Insertion Path
+_UI_PaletteRule_element_feature = Element
+_UI_Rule_permit_feature = Permit
+_UI_PathElement_feature_feature = Feature
+_UI_PathElement_origin_feature = Origin
+_UI_PathElement_target_feature = Target
+_UI_Unknown_feature = Unspecified
+
+_UI_OwningRule_type = Owning Rule
+_UI_ChildRule_type = Child Rule
+_UI_PapyrusView_modelRules_feature = Model Rules
+_UI_PapyrusView_owningRules_feature = Owning Rules
+_UI_PapyrusDiagram_childRules_feature = Child Rules
+_UI_ModelRule_multiplicity_feature = Multiplicity
+_UI_OwningRule_element_feature = Element
+_UI_OwningRule_multiplicity_feature = Multiplicity
+_UI_ChildRule_element_feature = Element
+_UI_ChildRule_origin_feature = Origin
+_UI_ChildRule_insertionPath_feature = Insertion Path
+_UI_PapyrusView_implementationID_feature = Implementation ID
+_UI_PapyrusView_parent_feature = Parent
+_UI_PapyrusConfiguration_profiles_feature = Profiles
+_UI_PapyrusView_icon_feature = Icon
+_UI_ModelRule_stereotypes_feature = Stereotypes
+_UI_OwningRule_stereotypes_feature = Stereotypes
+_UI_ChildRule_stereotypes_feature = Stereotypes
+_UI_PapyrusView_profiles_feature = Profiles
+_UI_PapyrusSyncTable_type = Papyrus Sync Table
+_UI_PapyrusTable_type = Papyrus Table
+_UI_PapyrusTable_configuration_feature = Configuration
+_UI_PapyrusDiagram_customPalette_feature = Custom Palette
+_UI_PapyrusDiagram_customStyle_feature = Custom Style
+_UI_PapyrusView_category_feature = Category
+_UI_Category_type = View Category
+_UI_PapyrusView_categories_feature = Categories
+_UI_Category_name_feature = Name
+_UI_PapyrusConfiguration_categories_feature = View Categories
+_UI_ElementImport_type = Element Import
+_UI_PapyrusDiagram_imports_feature = Imports
+_UI_ElementImport_from_feature = From
+_UI_ElementImport_element_feature = Element
+_UI_ModelRule_autoSelectPath_feature = Auto Select Path
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.xml
new file mode 100755
index 00000000000..17fa9cd3c33
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated configuration -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/infra/viewpoints/configuration"
+ class="org.eclipse.papyrus.infra.viewpoints.configuration.provider.ConfigurationItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java
new file mode 100755
index 00000000000..7a43e8a0bbc
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.Category} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CategoryItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CategoryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Category_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Category_name_feature", "_UI_Category_type"),
+ ConfigurationPackage.Literals.CATEGORY__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Category.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusView.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Category)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Category_type") :
+ getString("_UI_Category_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Category.class)) {
+ case ConfigurationPackage.CATEGORY__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java
new file mode 100755
index 00000000000..503a4ab8c83
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.EClassPropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.StereotypePropertyDescriptor;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ChildRuleItemProvider
+ extends RuleItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChildRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ addStereotypesPropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EClassPropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_element_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Stereotypes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStereotypesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new StereotypePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_stereotypes_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Origin feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addOriginPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EClassPropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_origin_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__ORIGIN,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.CHILD_RULE__INSERTION_PATH);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ChildRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ChildRule.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ ChildRule rule = (ChildRule) object;
+ StringBuilder builder = new StringBuilder("[");
+ builder.append(rule.getOrigin() != null ? rule.getOrigin().getName() : "#");
+ builder.append("] add: ");
+ if (!rule.getStereotypes().isEmpty()) {
+ builder.append("<<");
+ for (int i = 0; i != rule.getStereotypes().size(); i++) {
+ if (i != 0)
+ builder.append(",");
+ builder.append(rule.getStereotypes().get(i).getName());
+ }
+ builder.append(">> ");
+ }
+ builder.append(rule.getElement() != null ? rule.getElement().getName() : "#");
+ builder.append(" => ");
+ builder.append(rule.isPermit() ? "allow" : "deny");
+ return builder.toString();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ChildRule.class)) {
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.CHILD_RULE__INSERTION_PATH,
+ ConfigurationFactory.eINSTANCE.createPathElement()));
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java
new file mode 100755
index 00000000000..94da80deb98
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.Iso42010EditPlugin;
+
+/**
+ * This is the central singleton for the Configuration edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class ConfigurationEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final ConfigurationEditPlugin INSTANCE = new ConfigurationEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ Iso42010EditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
new file mode 100755
index 00000000000..3414bf305eb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
@@ -0,0 +1,498 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.util.ConfigurationAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusConfigurationItemProvider papyrusConfigurationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusConfigurationAdapter() {
+ if (papyrusConfigurationItemProvider == null) {
+ papyrusConfigurationItemProvider = new PapyrusConfigurationItemProvider(this);
+ }
+
+ return papyrusConfigurationItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusViewpointItemProvider papyrusViewpointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusViewpointAdapter() {
+ if (papyrusViewpointItemProvider == null) {
+ papyrusViewpointItemProvider = new PapyrusViewpointItemProvider(this);
+ }
+
+ return papyrusViewpointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusViewItemProvider papyrusViewItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusViewAdapter() {
+ if (papyrusViewItemProvider == null) {
+ papyrusViewItemProvider = new PapyrusViewItemProvider(this);
+ }
+
+ return papyrusViewItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramItemProvider papyrusDiagramItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusDiagramAdapter() {
+ if (papyrusDiagramItemProvider == null) {
+ papyrusDiagramItemProvider = new PapyrusDiagramItemProvider(this);
+ }
+
+ return papyrusDiagramItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusSyncTableItemProvider papyrusSyncTableItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusSyncTableAdapter() {
+ if (papyrusSyncTableItemProvider == null) {
+ papyrusSyncTableItemProvider = new PapyrusSyncTableItemProvider(this);
+ }
+
+ return papyrusSyncTableItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableItemProvider papyrusTableItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPapyrusTableAdapter() {
+ if (papyrusTableItemProvider == null) {
+ papyrusTableItemProvider = new PapyrusTableItemProvider(this);
+ }
+
+ return papyrusTableItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelRuleItemProvider modelRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createModelRuleAdapter() {
+ if (modelRuleItemProvider == null) {
+ modelRuleItemProvider = new ModelRuleItemProvider(this);
+ }
+
+ return modelRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OwningRuleItemProvider owningRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createOwningRuleAdapter() {
+ if (owningRuleItemProvider == null) {
+ owningRuleItemProvider = new OwningRuleItemProvider(this);
+ }
+
+ return owningRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildRuleItemProvider childRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createChildRuleAdapter() {
+ if (childRuleItemProvider == null) {
+ childRuleItemProvider = new ChildRuleItemProvider(this);
+ }
+
+ return childRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteRuleItemProvider paletteRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPaletteRuleAdapter() {
+ if (paletteRuleItemProvider == null) {
+ paletteRuleItemProvider = new PaletteRuleItemProvider(this);
+ }
+
+ return paletteRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PathElementItemProvider pathElementItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPathElementAdapter() {
+ if (pathElementItemProvider == null) {
+ pathElementItemProvider = new PathElementItemProvider(this);
+ }
+
+ return pathElementItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.Category} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CategoryItemProvider categoryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.Category}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCategoryAdapter() {
+ if (categoryItemProvider == null) {
+ categoryItemProvider = new CategoryItemProvider(this);
+ }
+
+ return categoryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ElementImportItemProvider elementImportItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createElementImportAdapter() {
+ if (elementImportItemProvider == null) {
+ elementImportItemProvider = new ElementImportItemProvider(this);
+ }
+
+ return elementImportItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (papyrusConfigurationItemProvider != null) papyrusConfigurationItemProvider.dispose();
+ if (papyrusViewpointItemProvider != null) papyrusViewpointItemProvider.dispose();
+ if (papyrusViewItemProvider != null) papyrusViewItemProvider.dispose();
+ if (papyrusDiagramItemProvider != null) papyrusDiagramItemProvider.dispose();
+ if (papyrusSyncTableItemProvider != null) papyrusSyncTableItemProvider.dispose();
+ if (papyrusTableItemProvider != null) papyrusTableItemProvider.dispose();
+ if (modelRuleItemProvider != null) modelRuleItemProvider.dispose();
+ if (owningRuleItemProvider != null) owningRuleItemProvider.dispose();
+ if (childRuleItemProvider != null) childRuleItemProvider.dispose();
+ if (paletteRuleItemProvider != null) paletteRuleItemProvider.dispose();
+ if (pathElementItemProvider != null) pathElementItemProvider.dispose();
+ if (categoryItemProvider != null) categoryItemProvider.dispose();
+ if (elementImportItemProvider != null) elementImportItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java
new file mode 100755
index 00000000000..9592e8606c7
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java
@@ -0,0 +1,182 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ElementImportItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ElementImportItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFromPropertyDescriptor(object);
+ addElementPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the From feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFromPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ElementImport_from_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ElementImport_from_feature", "_UI_ElementImport_type"),
+ ConfigurationPackage.Literals.ELEMENT_IMPORT__FROM,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ElementImport_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ElementImport_element_feature", "_UI_ElementImport_type"),
+ ConfigurationPackage.Literals.ELEMENT_IMPORT__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ElementImport.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementImport.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ ElementImport ei = (ElementImport) object;
+ StringBuilder builder = new StringBuilder("[");
+ builder.append(ei.getElement() != null ? ei.getElement().getName() : "?");
+ builder.append("] from ");
+ builder.append(ei.getFrom() != null ? PapyrusViewItemProvider.getTextFor(ei.getFrom()) : "?");
+ return builder.toString();
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
new file mode 100755
index 00000000000..450094af358
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.EClassPropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.StereotypePropertyDescriptor;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelRuleItemProvider
+ extends RuleItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ addStereotypesPropertyDescriptor(object);
+ addMultiplicityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EClassPropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_element_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Stereotypes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStereotypesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new StereotypePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_stereotypes_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Multiplicity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addMultiplicityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_multiplicity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_multiplicity_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__MULTIPLICITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.MODEL_RULE__AUTO_SELECT_PATH);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ModelRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ModelRule.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ ModelRule rule = (ModelRule) object;
+ StringBuilder builder = new StringBuilder("Root: ");
+ if (!rule.getStereotypes().isEmpty()) {
+ builder.append("<<");
+ for (int i = 0; i != rule.getStereotypes().size(); i++) {
+ if (i != 0)
+ builder.append(",");
+ builder.append(rule.getStereotypes().get(i).getName());
+ }
+ builder.append(">> ");
+ }
+ builder.append(rule.getElement() != null ? rule.getElement().getName() : "#");
+ builder.append("[");
+ builder.append(rule.getMultiplicity() == -1 ? "*" : rule.getMultiplicity());
+ builder.append("] => ");
+ builder.append(rule.isPermit() ? "allow" : "deny");
+ return builder.toString();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ModelRule.class)) {
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.MODEL_RULE__AUTO_SELECT_PATH,
+ ConfigurationFactory.eINSTANCE.createPathElement()));
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
new file mode 100755
index 00000000000..1748a6c4dd0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
@@ -0,0 +1,210 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.EClassPropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.StereotypePropertyDescriptor;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OwningRuleItemProvider
+ extends RuleItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OwningRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ addStereotypesPropertyDescriptor(object);
+ addMultiplicityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EClassPropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_element_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Stereotypes feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStereotypesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new StereotypePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_stereotypes_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Multiplicity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addMultiplicityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_multiplicity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_multiplicity_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__MULTIPLICITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns OwningRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/OwningRule.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ OwningRule rule = (OwningRule) object;
+ StringBuilder builder = new StringBuilder("Owner: ");
+ if (!rule.getStereotypes().isEmpty()) {
+ builder.append("<<");
+ for (int i = 0; i != rule.getStereotypes().size(); i++) {
+ if (i != 0)
+ builder.append(",");
+ builder.append(rule.getStereotypes().get(i).getName());
+ }
+ builder.append(">> ");
+ }
+ builder.append(rule.getElement() != null ? rule.getElement().getName() : "#");
+ builder.append("[");
+ builder.append(rule.getMultiplicity() == -1 ? "*" : rule.getMultiplicity());
+ builder.append("] => ");
+ builder.append(rule.isPermit() ? "allow" : "deny");
+ return builder.toString();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(OwningRule.class)) {
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java
new file mode 100755
index 00000000000..4d0cacbccbe
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteRuleItemProvider
+ extends RuleItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PaletteRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PaletteRule_element_feature", "_UI_PaletteRule_type"),
+ ConfigurationPackage.Literals.PALETTE_RULE__ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PaletteRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PaletteRule.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ PaletteRule rule = (PaletteRule) object;
+ String data = "*";
+ if (rule.getElement() != null && !rule.getElement().isEmpty())
+ data = rule.getElement();
+ return "Palette: " + data + " => " + (rule.isPermit() ? "allow" : "deny");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PaletteRule.class)) {
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java
new file mode 100755
index 00000000000..699f0766555
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.EPackagePropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.ArchitectureFrameworkItemProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusConfigurationItemProvider
+ extends ArchitectureFrameworkItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusConfigurationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDefaultStakeholderPropertyDescriptor(object);
+ addMetamodelPropertyDescriptor(object);
+ addCategoriesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Default Stakeholder feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDefaultStakeholderPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusConfiguration_defaultStakeholder_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_defaultStakeholder_feature", "_UI_PapyrusConfiguration_type"),
+ ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Metamodel feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected void addMetamodelPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EPackagePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusConfiguration_metamodel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_metamodel_feature", "_UI_PapyrusConfiguration_type"),
+ ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__METAMODEL,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Categories feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCategoriesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusConfiguration_categories_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_categories_feature", "_UI_PapyrusConfiguration_type"),
+ ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__CATEGORIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__CATEGORIES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PapyrusConfiguration.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusConfiguration.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ PapyrusConfiguration config = (PapyrusConfiguration) object;
+ if (config.getMetamodel() != null)
+ return "Papyrus Configuration (" + config.getMetamodel().getNsURI() + ")";
+ return "Papyrus Configuration (?)";
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PapyrusConfiguration.class)) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
+ ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS,
+ Iso42010Factory.eINSTANCE.createStakeholder()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__CATEGORIES,
+ ConfigurationFactory.eINSTANCE.createCategory()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
new file mode 100755
index 00000000000..8263e4d0dd1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
@@ -0,0 +1,226 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusDiagramItemProvider
+ extends PapyrusViewItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagramItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCustomPalettePropertyDescriptor(object);
+ addCustomStylePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Palette feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomPalettePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customPalette_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customPalette_feature", "_UI_PapyrusDiagram_type"),
+ ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_PALETTE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Custom Style feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCustomStylePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customStyle_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customStyle_feature", "_UI_PapyrusDiagram_type"),
+ ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_STYLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__IMPORTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PapyrusDiagram.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusDiagram.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ return getTextFor((PapyrusDiagram) object);
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PapyrusDiagram.class)) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES,
+ ConfigurationFactory.eINSTANCE.createChildRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES,
+ ConfigurationFactory.eINSTANCE.createPaletteRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__IMPORTS,
+ ConfigurationFactory.eINSTANCE.createElementImport()));
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java
new file mode 100755
index 00000000000..0c28697c661
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java
@@ -0,0 +1,115 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusSyncTableItemProvider
+ extends PapyrusViewItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusSyncTableItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns PapyrusSyncTable.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusSyncTable.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ return getTextFor((PapyrusSyncTable) object);
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java
new file mode 100755
index 00000000000..ccef2d388ba
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java
@@ -0,0 +1,148 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusTableItemProvider
+ extends PapyrusViewItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTableItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addConfigurationPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Configuration feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addConfigurationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_configuration_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_configuration_feature", "_UI_PapyrusTable_type"),
+ ConfigurationPackage.Literals.PAPYRUS_TABLE__CONFIGURATION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PapyrusTable.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusTable.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ return getTextFor((PapyrusTable) object);
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PapyrusTable.class)) {
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java
new file mode 100755
index 00000000000..36462a2ff4b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java
@@ -0,0 +1,316 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ProfilePropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.ModelKindItemProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusViewItemProvider
+ extends ModelKindItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIconPropertyDescriptor(object);
+ addParentPropertyDescriptor(object);
+ addProfilesPropertyDescriptor(object);
+ addImplementationIDPropertyDescriptor(object);
+ addCategoriesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Icon feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIconPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_icon_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_icon_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__ICON,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Parent feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addParentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_parent_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_parent_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__PARENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Profiles feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addProfilesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new ProfilePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_profiles_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_profiles_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__PROFILES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Implementation ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addImplementationIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_implementationID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_implementationID_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__IMPLEMENTATION_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Categories feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCategoriesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_categories_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_categories_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__CATEGORIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_VIEW__MODEL_RULES);
+ childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_VIEW__OWNING_RULES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PapyrusView.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusView.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getTextFor((PapyrusView) object);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected static String getTextFor(PapyrusView view) {
+ PapyrusViewpoint vp = (PapyrusViewpoint) view.eContainer();
+ if (view.getName() == null)
+ return (vp.getName() + " :: <natural> [" + view.getImplementationID() + "]");
+ return (vp.getName() + " :: " + view.getName());
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PapyrusView.class)) {
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_VIEW__MODEL_RULES,
+ ConfigurationFactory.eINSTANCE.createModelRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.PAPYRUS_VIEW__OWNING_RULES,
+ ConfigurationFactory.eINSTANCE.createOwningRule()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java
new file mode 100755
index 00000000000..af4d56f7cb4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java
@@ -0,0 +1,166 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.ArchitectureViewpointItemProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PapyrusViewpointItemProvider
+ extends ArchitectureViewpointItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addParentPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Parent feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addParentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusViewpoint_parent_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusViewpoint_parent_feature", "_UI_PapyrusViewpoint_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEWPOINT__PARENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PapyrusViewpoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PapyrusViewpoint.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PapyrusViewpoint)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_PapyrusViewpoint_type") : label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusDiagram()));
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusTable()));
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusSyncTable()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java
new file mode 100755
index 00000000000..4dafa8baee5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.EReferencePropertyDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PathElementItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PathElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFeaturePropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ addTargetPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Feature feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected void addFeaturePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (new EReferencePropertyDescriptor(createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_feature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_feature_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
+ }
+
+ /**
+ * This adds a property descriptor for the Origin feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected void addOriginPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_origin_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__ORIGIN,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Target feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTargetPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_target_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_target_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__TARGET,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns PathElement.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PathElement.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ PathElement path = (PathElement) object;
+ String data = "<undefined>";
+ if (path.getFeature() != null && path.getOrigin() != null)
+ data = path.getOrigin().getName() + "." + path.getFeature().getName() + " => " + path.getTarget().getName();
+ return data;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java
new file mode 100755
index 00000000000..6883828ee78
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Rule;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuleItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPermitPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Permit feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPermitPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Rule_permit_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rule_permit_feature", "_UI_Rule_type"),
+ ConfigurationPackage.Literals.RULE__PERMIT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Rule rule = (Rule)object;
+ return getString("_UI_Rule_type") + " " + rule.isPermit();
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Rule.class)) {
+ case ConfigurationPackage.RULE__PERMIT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ConfigurationEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.classpath
index 59cf3977c7e..2d1a4302f04 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.classpath
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.classpath
@@ -1,8 +1,7 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.project
new file mode 100755
index 00000000000..bcf711a4642
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.configuration.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.settings/org.eclipse.jdt.core.prefs
index 13d4138d936..44217f8c068 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,7 @@
-#Mon Jan 17 11:23:08 CET 2011
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..296c54dd063
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuration.editor;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.presentation
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.papyrus.infra.viewpoints.iso42010.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration.edit;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/about.html
index 82d49bf5f81..dd02e0be168 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/about.html
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/about.html
@@ -8,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>
-<p>June 5, 2007</p>
+<p>December 2, 2009</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
@@ -22,7 +22,7 @@ being redistributed by another party (&quot;Redistributor&quot;) and different t
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/build.properties
new file mode 100755
index 00000000000..8e222d89d9f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/build.properties
@@ -0,0 +1,11 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/obj16/ConfigurationModelFile.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/obj16/ConfigurationModelFile.png
new file mode 100755
index 00000000000..3b2678c6fc5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/obj16/ConfigurationModelFile.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.png
new file mode 100755
index 00000000000..3bbe92e6221
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.svg
new file mode 100755
index 00000000000..6ff5248efe8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/icons/full/wizban/NewConfiguration.svg
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="750"
+ height="660"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="WizBan.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\Wizban.png"
+ inkscape:export-xdpi="9"
+ inkscape:export-ydpi="9">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3795">
+ <stop
+ style="stop-color:#c8c8ff;stop-opacity:1;"
+ offset="0"
+ id="stop3797" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.58823532;"
+ offset="1"
+ id="stop3799" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3019"
+ gradientUnits="userSpaceOnUse"
+ x1="444.28577"
+ y1="971.64789"
+ x2="444.28577"
+ y2="201.53497" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3021"
+ gradientUnits="userSpaceOnUse"
+ x1="444.28577"
+ y1="971.64789"
+ x2="444.28577"
+ y2="201.53497" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3783"
+ id="linearGradient3023"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.25,0,0,1.25,-222.5,-53.090544)"
+ x1="758.57141"
+ y1="343.79074"
+ x2="948.75952"
+ y2="153.60266" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3795"
+ id="linearGradient3801"
+ x1="737.41138"
+ y1="1017.2488"
+ x2="230.78159"
+ y2="358.62936"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="251.27384"
+ inkscape:cy="370.72485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="File"
+ style="display:inline"
+ transform="translate(0,-364)">
+ <rect
+ style="fill:url(#linearGradient3801);fill-opacity:1;stroke:none"
+ id="rect3025"
+ width="750"
+ height="660"
+ x="0"
+ y="364.00003" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#9696c8;fill-opacity:0.58823532;stroke:none"
+ id="path3803"
+ sodipodi:cx="550.53314"
+ sodipodi:cy="298.36539"
+ sodipodi:rx="261.62952"
+ sodipodi:ry="195.96959"
+ d="m 812.16266,298.36539 a 261.62952,195.96959 0 1 1 -523.25903,0 261.62952,195.96959 0 1 1 523.25903,0 z"
+ transform="matrix(0.63782687,-0.55249393,0.72923815,0.48323784,-19.016144,951.1577)" />
+ <g
+ id="g3008"
+ transform="matrix(0.49779558,0,0,0.49779558,-11.083413,475.28572)">
+ <path
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0"
+ id="rect2985"
+ d="m 250.55206,152.91425 469.44797,0 229.44797,229.44793 -6e-5,619.44792 -698.89588,0 z"
+ style="fill:url(#linearGradient3019);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3021);stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ transform="translate(0,-28.36218)" />
+ <path
+ sodipodi:nodetypes="cccc"
+ inkscape:connector-curvature="0"
+ id="rect3780"
+ d="m 715,137.36218 250,250 -250,0 z"
+ style="fill:url(#linearGradient3023);fill-opacity:1;stroke:none;display:inline"
+ transform="translate(0,-28.36218)" />
+ <g
+ id="g3910">
+ <path
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-x="-280"
+ d="m 333.91746,576.89245 331.1681,-11.03899 c 12.10305,20.96311 10.59675,36.84058 0,55.19468 l -331.1681,-11.03888 c -6.07195,-10.5169 -7.99455,-19.26985 0,-33.11681 z"
+ id="rect3797"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#3232ff;fill-opacity:0.99607843;fill-rule:evenodd;stroke:#000000;stroke-width:10.1804142;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="path3027"
+ sodipodi:cx="428.57144"
+ sodipodi:cy="679.71429"
+ sodipodi:rx="84.285713"
+ sodipodi:ry="84.285713"
+ d="m 512.85715,679.71429 c 0,46.54972 -37.73599,84.28572 -84.28571,84.28572 -46.54971,0 -84.28571,-37.736 -84.28571,-84.28572 0,-46.54971 37.736,-84.28571 84.28571,-84.28571 46.54972,0 84.28571,37.736 84.28571,84.28571 z"
+ transform="matrix(0.98227829,0,0,0.98227829,-230.56514,-74.217723)" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3856"
+ d="M 306.62797,508.16338 587.90846,333.01926 c 20.96312,12.10306 27.59734,26.60652 27.59734,47.8 L 323.18637,536.84337 c -10.51692,-6.07194 -16.5584,-12.69091 -16.5584,-28.67999 z"
+ inkscape:transform-center-x="-243.7231"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-y="-143.60032" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3862"
+ d="m 248.63004,462.28699 156.02398,-292.3195 c 24.20614,0 37.20327,9.24325 47.80001,27.59734 l -175.144,281.28057 c -12.14388,0 -20.68545,-2.71145 -28.67999,-16.55841 z"
+ inkscape:transform-center-x="-143.60036"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-y="-243.72307" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3864"
+ d="m 323.18631,650.05833 292.31949,156.024 c 0,24.20612 -9.24324,37.20325 -27.59734,47.80001 l -281.28055,-175.144 c -2e-5,-12.14389 2.71144,-20.68545 16.5584,-28.68001 z"
+ inkscape:transform-center-x="-243.72307"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-y="143.60036" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3866"
+ d="m 277.30993,708.05626 175.1441,281.28046 c -12.10307,20.96318 -26.60651,27.59738 -47.80001,27.59738 L 248.62992,724.61466 c 6.07194,-10.5169 12.69091,-16.5584 28.68001,-16.5584 z"
+ inkscape:transform-center-x="-143.60031"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-y="243.72308" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.properties
new file mode 100755
index 00000000000..568790234f0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.properties
@@ -0,0 +1,65 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Configuration - Editor (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_ConfigurationEditor_menu = &Configuration Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Papyrus
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_ConfigurationModelWizard_label = Viewpoints configuration
+_UI_ConfigurationModelWizard_description = Create a new viewpoints configuration model
+
+_UI_ConfigurationEditor_label = Viewpoints Configuration Model Editor
+
+_UI_ConfigurationEditorFilenameDefaultBase = My
+_UI_ConfigurationEditorFilenameExtensions = configuration
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.xml
new file mode 100755
index 00000000000..a7bc395be29
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- @generated configuration -->
+ <wizard
+ id="org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationModelWizardID"
+ name="%_UI_ConfigurationModelWizard_label"
+ class="org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationModelWizard"
+ category="org.eclipse.papyrus.wizards.category"
+ icon="icons/full/obj16/ConfigurationModelFile.png">
+ <description>%_UI_ConfigurationModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <!-- @generated configuration -->
+ <editor
+ id="org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationEditorID"
+ name="%_UI_ConfigurationEditor_label"
+ icon="icons/full/obj16/ConfigurationModelFile.png"
+ extensions="configuration"
+ class="org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationEditor"
+ contributorClass="org.eclipse.papyrus.infra.viewpoints.configuration.presentation.ConfigurationActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationActionBarContributor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationActionBarContributor.java
new file mode 100755
index 00000000000..9d1858515c4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationActionBarContributor.java
@@ -0,0 +1,434 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Configuration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ }
+ catch (PartInitException exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(ConfigurationEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("configuration-settings"));
+ toolBarManager.add(new Separator("configuration-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationEditor_menu"), "org.eclipse.papyrus.infra.viewpoints.configurationMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(ConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(ConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(ConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+
+ submenuManager = new MenuManager(ConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditor.java
new file mode 100755
index 00000000000..07e0af3313e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditor.java
@@ -0,0 +1,1795 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.presentation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.viewpoints.configuration.provider.ConfigurationItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.Iso42010ItemProviderAdapterFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+
+/**
+ * This is an example of a Configuration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(ConfigurationEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(ConfigurationEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == ConfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ }
+ else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(ConfigurationEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == ConfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(ConfigurationEditor.this, false);
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.papyrus.infra.viewpoints.configuration.editor",
+ 0,
+ null,
+ new Object [] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"),
+ getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ConfigurationItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new Iso42010ItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ currentViewer.refresh();
+ }
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ }
+ else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.infra.viewpoints.configuration.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.infra.viewpoints.configuration.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"});
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), ConfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label"));
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ ConfigurationEditor.this.setSelectionToViewer(selection);
+ ConfigurationEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return ConfigurationEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return ConfigurationEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditorPlugin.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditorPlugin.java
new file mode 100755
index 00000000000..82162189f4d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationEditorPlugin.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.presentation;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.provider.Iso42010EditPlugin;
+
+/**
+ * This is the central singleton for the Configuration editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class ConfigurationEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final ConfigurationEditorPlugin INSTANCE = new ConfigurationEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationEditorPlugin() {
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ Iso42010EditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationModelWizard.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationModelWizard.java
new file mode 100755
index 00000000000..f78e39f0708
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src/org/eclipse/papyrus/infra/viewpoints/configuration/presentation/ConfigurationModelWizard.java
@@ -0,0 +1,602 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+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.xmi.XMLResource;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.provider.ConfigurationEditPlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationEditorFilenameExtensions").split("\\s*,\\s*")));
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConfigurationPackage configurationPackage = ConfigurationPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConfigurationFactory configurationFactory = configurationPackage.getConfigurationFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConfigurationModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConfigurationModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(ConfigurationEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ConfigurationEditorPlugin.INSTANCE.getImage("full/wizban/NewConfiguration.png")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ initialObjectNames.add(ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION.getName());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)configurationPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = configurationFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), ConfigurationEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ ConfigurationEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ConfigurationModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
+ setErrorMessage(ConfigurationEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ConfigurationModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE); {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(ConfigurationEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return ConfigurationEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ }
+ catch(MissingResourceException mre) {
+ ConfigurationEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(ConfigurationEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new ConfigurationModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationModelWizard_label"));
+ newFileCreationPage.setDescription(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationModelWizard_description"));
+ newFileCreationPage.setFileName(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new ConfigurationModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(ConfigurationEditorPlugin.INSTANCE.getString("_UI_ConfigurationModelWizard_label"));
+ initialObjectCreationPage.setDescription(ConfigurationEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.classpath
new file mode 100755
index 00000000000..744fb582747
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.classpath
@@ -0,0 +1,8 @@
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="custom-src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.project
new file mode 100755
index 00000000000..28e4c8d56a1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.configuration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.settings/org.eclipse.jdt.core.prefs
index 0f6c4f5af03..44217f8c068 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,7 @@
-#Wed Feb 16 09:06:49 CET 2011
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..70d6e3e5177
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuration;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.jface,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.edit,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration,
+ org.eclipse.papyrus.infra.viewpoints.configuration.ui,
+ org.eclipse.papyrus.infra.viewpoints.configuration.impl,
+ org.eclipse.papyrus.infra.viewpoints.configuration.util
+Bundle-ActivationPolicy: lazy
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/about.html
index 82d49bf5f81..dd02e0be168 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/about.html
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/about.html
@@ -8,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>
-<p>June 5, 2007</p>
+<p>December 2, 2009</p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
@@ -22,7 +22,7 @@ being redistributed by another party (&quot;Redistributor&quot;) and different t
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/build.properties
new file mode 100755
index 00000000000..f2ec60f54ef
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/build.properties
@@ -0,0 +1,14 @@
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ icons/
+jars.compile.order = .
+source.. = src/,\
+ custom-src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EClassPropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EClassPropertyDescriptor.java
new file mode 100755
index 00000000000..758a9de7d8b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EClassPropertyDescriptor.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a descriptor for properties of type EClass
+ * @author Laurent Wouters
+ */
+public class EClassPropertyDescriptor extends SurrogateItemPropertyDescriptor {
+ private static final Collection<EObject> empty = new ArrayList<EObject>();
+
+ public EClassPropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object object) {
+ EObject current = (EObject)object;
+ while (current != null && !(current instanceof PapyrusConfiguration))
+ current = current.eContainer();
+ if (current == null)
+ return empty;
+ PapyrusConfiguration conf = (PapyrusConfiguration)current;
+ List<EClass> result = new ArrayList<EClass>();
+ EPackage p = conf.getMetamodel();
+ if (p == null)
+ return result;
+ for (EClassifier c : p.getEClassifiers())
+ if (c instanceof EClass)
+ result.add((EClass)c);
+ return result;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EPackagePropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EPackagePropertyDescriptor.java
new file mode 100755
index 00000000000..67a06a6fb09
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EPackagePropertyDescriptor.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a descriptor for properties of type EPackage.
+ * This class lists the currently loaded ECore metamodels.
+ * @author Laurent Wouters
+ */
+public class EPackagePropertyDescriptor extends SurrogateItemPropertyDescriptor {
+ public EPackagePropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object object) {
+ EPackage.Registry reg = EPackage.Registry.INSTANCE;
+ Collection<EPackage> result = new ArrayList<EPackage>(reg.size());
+ Collection<String> keys = new ArrayList<String>(reg.keySet());
+ for (String key : keys) {
+ EPackage pack = reg.getEPackage(key);
+ if (!result.contains(pack))
+ result.add(reg.getEPackage(key));
+ }
+ return result;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object) {
+ return new IItemLabelProvider() {
+ public String getText(Object object) {
+ return ((EPackage)object).getNsURI();
+ }
+ public Object getImage(Object object) { return null; }
+ };
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EReferencePropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EReferencePropertyDescriptor.java
new file mode 100755
index 00000000000..597cc2ba718
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/EReferencePropertyDescriptor.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a descriptor for properties of type EReference
+ * @author Laurent Wouters
+ */
+public class EReferencePropertyDescriptor extends SurrogateItemPropertyDescriptor {
+ private static final Collection<?> empty = new ArrayList<EReference>();
+
+ public EReferencePropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object object) {
+ PathElement pe = (PathElement)object;
+ EClass origin = pe.getOrigin();
+ if (origin == null)
+ return empty;
+ return origin.getEAllReferences();
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ProfilePropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ProfilePropertyDescriptor.java
new file mode 100755
index 00000000000..785206b57e4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ProfilePropertyDescriptor.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a descriptor for properties of type EList of EPackage
+ * This class lists the currently loaded ECore metamodels.
+ * @author Laurent Wouters
+ */
+public class ProfilePropertyDescriptor extends EPackagePropertyDescriptor {
+ public ProfilePropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object) {
+ return new IItemLabelProvider() {
+ public String getText(Object object) {
+ if (object instanceof EPackage)
+ return ((EPackage)object).getNsURI();
+ if (object instanceof EList<?>) {
+ EList<?> list = (EList<?>)object;
+ if (list.isEmpty())
+ return "";
+ StringBuilder builder = new StringBuilder("{");
+ for (int i=0; i!=list.size(); i++) {
+ if (i != 0)
+ builder.append(", ");
+ builder.append(((EPackage)list.get(i)).getNsURI());
+ }
+ builder.append("}");
+ return builder.toString();
+ }
+ return "";
+ }
+ public Object getImage(Object object) { return null; }
+ };
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/StereotypePropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/StereotypePropertyDescriptor.java
new file mode 100755
index 00000000000..c1defd00456
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/StereotypePropertyDescriptor.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a descriptor for stereotype properties
+ * @author Laurent Wouters
+ */
+public class StereotypePropertyDescriptor extends SurrogateItemPropertyDescriptor {
+ private static final Collection<EObject> empty = new ArrayList<EObject>();
+
+ public StereotypePropertyDescriptor(IItemPropertyDescriptor inner) {
+ super(inner);
+ }
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object object) {
+ EObject current = (EObject)object;
+ while (current != null && !(current instanceof PapyrusView))
+ current = current.eContainer();
+ if (current == null)
+ return empty;
+ PapyrusView conf = (PapyrusView)current;
+ List<EClass> result = new ArrayList<EClass>();
+ for (EPackage p : conf.getProfiles())
+ for (EClassifier c : p.getEClassifiers())
+ if (c instanceof EClass)
+ result.add((EClass)c);
+ return result;
+ }
+
+ @Override
+ public IItemLabelProvider getLabelProvider(Object object) {
+ return new IItemLabelProvider() {
+ public String getText(Object object) {
+ if (object instanceof EClass)
+ return eClassToString((EClass)object);
+ if (object instanceof EList<?>) {
+ EList<?> list = (EList<?>)object;
+ if (list.isEmpty())
+ return "";
+ StringBuilder builder = new StringBuilder("{");
+ for (int i=0; i!=list.size(); i++) {
+ if (i != 0)
+ builder.append(", ");
+ builder.append(eClassToString((EClass)list.get(i)));
+ }
+ builder.append("}");
+ return builder.toString();
+ }
+ return "";
+ }
+ public Object getImage(Object object) { return null; }
+ };
+ }
+
+ private String eClassToString(EClass item) {
+ return item.getEPackage().getNsPrefix() + "#" + item.getName();
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/SurrogateItemPropertyDescriptor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/SurrogateItemPropertyDescriptor.java
new file mode 100755
index 00000000000..4e81ea6e858
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/SurrogateItemPropertyDescriptor.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import java.util.Collection;
+
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * Represents a surrogate property descriptor delegating to an encapsulated descriptor
+ * @author Laurent Wouters
+ */
+public abstract class SurrogateItemPropertyDescriptor implements IItemPropertyDescriptor {
+ private IItemPropertyDescriptor inner;
+
+ public SurrogateItemPropertyDescriptor(IItemPropertyDescriptor inner) {
+ this.inner = inner;
+ }
+
+ public Object getPropertyValue(Object object) { return inner.getPropertyValue(object); }
+
+ public boolean isPropertySet(Object object) { return inner.isPropertySet(object); }
+
+ public boolean canSetProperty(Object object) { return inner.canSetProperty(object); }
+
+ public void resetPropertyValue(Object object) { inner.resetPropertyValue(object); }
+
+ public void setPropertyValue(Object object, Object value) { inner.setPropertyValue(object, value); }
+
+ public String getCategory(Object object) { return inner.getCategory(object); }
+
+ public String getDescription(Object object) { return inner.getDescription(object); }
+
+ public String getDisplayName(Object object) { return inner.getDisplayName(object); }
+
+ public String[] getFilterFlags(Object object) { return inner.getFilterFlags(object); }
+
+ public Object getHelpContextIds(Object object) { return inner.getHelpContextIds(object); }
+
+ public String getId(Object object) { return inner.getId(object); }
+
+ public IItemLabelProvider getLabelProvider(Object object) { return inner.getLabelProvider(object); }
+
+ public boolean isCompatibleWith(Object object, Object anotherObject, IItemPropertyDescriptor anotherPropertyDescriptor) {
+ return inner.isCompatibleWith(object, anotherObject, anotherPropertyDescriptor);
+ }
+
+ public Object getFeature(Object object) { return inner.getFeature(object); }
+
+ public boolean isMany(Object object) { return inner.isMany(object); }
+
+ public abstract Collection<?> getChoiceOfValues(Object object);
+
+ public boolean isMultiLine(Object object) { return inner.isMultiLine(object); }
+
+ public boolean isSortChoices(Object object) { return inner.isSortChoices(object); }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ConfigurationURLSelectionDialog.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ConfigurationURLSelectionDialog.java
new file mode 100755
index 00000000000..ed3720c1449
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ConfigurationURLSelectionDialog.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+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.Shell;
+
+/**
+ * Dialog for the selection of a configuration model through URIs
+ * @author Laurent Wouters
+ */
+public class ConfigurationURLSelectionDialog extends Dialog {
+
+ private static final int SIZE_WIDTH = 400;
+ private static final int SIZE_HEIGHT = 300;
+ private static final String MSG_TITLE = "Select the URI of the configuration model";
+
+ private static final Object TREE_ROOT = new Object();
+
+ private Resource selection;
+
+ /**
+ * Represents a provider of URIs
+ * @author Laurent Wouters
+ */
+ private static class ModelContentProvider implements IStructuredContentProvider {
+ public void dispose() { }
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+ public Object[] getElements(Object inputElement) {
+ List<Resource> data = new ArrayList<Resource>();
+
+ return data.toArray();
+ }
+ }
+
+ public ConfigurationURLSelectionDialog(Shell parentShell, int style) {
+ super(parentShell);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ composite.setLayout(gridLayout);
+
+ Composite inner = new Composite(composite, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
+ inner.setLayout(new FillLayout());
+
+ ListViewer list = new ListViewer(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ list.setLabelProvider(getLabelProvider());
+ list.setContentProvider(new ModelContentProvider());
+ list.setInput(TREE_ROOT);
+ list.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection s = (IStructuredSelection)event.getSelection();
+ Object first = s.getFirstElement();
+ if (first == null)
+ onSelection(null);
+ else if (first instanceof Resource)
+ onSelection((Resource)first);
+ else
+ onSelection(null);
+ }
+ });
+
+ applyDialogFont(composite);
+ return composite;
+ }
+
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control composite = super.createButtonBar(parent);
+ if (selection == null)
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ else
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ return composite;
+ }
+
+ private void onSelection(Resource element) {
+ selection = element;
+ if (selection == null) {
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ } else {
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ }
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setSize(SIZE_WIDTH, SIZE_HEIGHT);
+ Point size = shell.getParent().getShell().getSize();
+ shell.setLocation((size.x - SIZE_WIDTH)/2, (size.y - SIZE_HEIGHT)/2);
+ shell.setText(MSG_TITLE);
+ }
+
+ private ILabelProvider getLabelProvider() {
+ return new ILabelProvider() {
+ public void addListener(ILabelProviderListener listener) { }
+ public void dispose() { }
+ public boolean isLabelProperty(Object element, String property) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+ public void removeListener(ILabelProviderListener listener) { }
+ public Image getImage(Object element) { return null; }
+ public String getText(Object element) {
+ Resource res = (Resource)element;
+ return res.getURI().toString();
+ }
+ };
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ECoreModelContentProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ECoreModelContentProvider.java
new file mode 100755
index 00000000000..dafef1d30a8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ECoreModelContentProvider.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.ui;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * Represents a content provider for a hierarchy of Ecore objects
+ * @author Laurent Wouters
+ */
+public class ECoreModelContentProvider implements ITreeContentProvider {
+ /**
+ * Represents the top object to be passed as input for to the viewer using this provider
+ */
+ public static final Object ROOT = new Object();
+
+ private EObject root;
+
+ /**
+ * Initializes this provider with the given object as root
+ * @param root The root object
+ */
+ public ECoreModelContentProvider(EObject root) {
+ this.root = root;
+ }
+
+ public void dispose() { }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+
+ public Object[] getElements(Object inputElement) {
+ return new Object[] { root };
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement == ROOT)
+ return new Object[] { root };
+ EObject origin = (EObject)parentElement;
+ return origin.eContents().toArray();
+ }
+
+ public Object getParent(Object element) {
+ if (element == ROOT)
+ return null;
+ EObject child = (EObject)element;
+ return child.eContainer();
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element == ROOT)
+ return true;
+ EObject origin = (EObject)element;
+ return !origin.eContents().isEmpty();
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/IModelElementValidator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/IModelElementValidator.java
new file mode 100755
index 00000000000..718e21e615f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/IModelElementValidator.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.ui;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Represents the validation for the selection of an object
+ * @author Laurent Wouters
+ */
+public interface IModelElementValidator {
+ /**
+ * Determines whether the given object pass the represented validation
+ * @param element The element to evaluate
+ * @return <code>null</code> if the object passes the validation, or the notification to be displayed
+ */
+ String isSelectable(EObject element);
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ModelElementSelectionDialog.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ModelElementSelectionDialog.java
new file mode 100755
index 00000000000..3020ec1a5b0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/custom-src/org/eclipse/papyrus/infra/viewpoints/configuration/ui/ModelElementSelectionDialog.java
@@ -0,0 +1,222 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.ui;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+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.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Represents a dialog for the selection of a model element
+ * @author Laurent Wouters
+ */
+public class ModelElementSelectionDialog extends Dialog {
+ private static final int SIZE_WIDTH = 400;
+ private static final int SIZE_HEIGHT = 300;
+
+ private static final String MSG_TITLE = "Model element selection";
+ private static final String MSG_EMPTYSELECTION = "Select an element";
+
+ private ServicesRegistry registry;
+ private EObject root;
+ private EObject selection;
+ private IModelElementValidator validator;
+ private Label notification;
+ private String message;
+
+ private static class AtomSelection implements IStructuredSelection {
+ private Object element;
+ public AtomSelection(Object element) {
+ this.element = element;
+ }
+ public boolean isEmpty() {
+ return (element == null);
+ }
+ public Object getFirstElement() {
+ return element;
+ }
+ public Iterator iterator() {
+ return new Iterator() {
+ private boolean done = false;
+ public boolean hasNext() {
+ return (!done);
+ }
+ public Object next() {
+ if (done)
+ throw new NoSuchElementException();
+ done = true;
+ return element;
+ }
+ public void remove() { }
+ };
+ }
+ public int size() {
+ return ((element != null) ? 1 : 0);
+ }
+ public Object[] toArray() {
+ if (element == null)
+ return new Object[0];
+ return new Object[] { element };
+ }
+ public List toList() {
+ List<Object> list = new ArrayList<Object>(1);
+ if (element != null)
+ list.add(element);
+ return list;
+ }
+ }
+
+
+ public EObject getSelection() {
+ return selection;
+ }
+
+ public ModelElementSelectionDialog(Shell parentShell, ServicesRegistry registry, String message, EObject root, EObject current, IModelElementValidator validator) {
+ super(parentShell);
+ this.registry = registry;
+ this.root = root;
+ this.selection = current;
+ this.validator = validator;
+ this.message = message;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ // create composite
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ composite.setLayout(gridLayout);
+
+ Label label = new Label(composite, SWT.WRAP | SWT.SINGLE);
+ label.setText(message);
+ label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+
+ Composite inner = new Composite(composite, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
+ inner.setLayout(new FillLayout());
+
+ TreeViewer tree = new TreeViewer(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree.setLabelProvider(getLabelProvider());
+ tree.setContentProvider(new ECoreModelContentProvider(root));
+ tree.setInput(ECoreModelContentProvider.ROOT);
+ if (selection != null) {
+ tree.reveal(selection);
+ tree.setSelection(new AtomSelection(selection));
+ }
+ tree.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection s = (IStructuredSelection)event.getSelection();
+ Object first = s.getFirstElement();
+ if (first == null)
+ onSelection(null);
+ else if (first instanceof EObject)
+ onSelection((EObject)first);
+ else
+ onSelection(null);
+ }
+ });
+
+ notification = new Label(composite, SWT.WRAP | SWT.SINGLE);
+ notification.setForeground(new Color(composite.getDisplay(), 255, 0, 0));
+ notification.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+ if (selection == null)
+ notification.setText(MSG_EMPTYSELECTION);
+ else {
+ String msg = validator.isSelectable(selection);
+ if (msg == null)
+ notification.setText("");
+ else
+ notification.setText(msg);
+ }
+
+ applyDialogFont(composite);
+ return composite;
+ }
+
+ @Override
+ protected Control createButtonBar(Composite parent) {
+ Control composite = super.createButtonBar(parent);
+ if (selection == null)
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ else {
+ String msg = validator.isSelectable(selection);
+ if (msg == null)
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ else
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ }
+ return composite;
+ }
+
+
+ private void onSelection(EObject element) {
+ selection = element;
+ if (selection == null) {
+ notification.setText(MSG_EMPTYSELECTION);
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ } else {
+ String msg = validator.isSelectable(selection);
+ if (msg == null) {
+ notification.setText("");
+ getButton(IDialogConstants.OK_ID).setEnabled(true);
+ } else {
+ notification.setText(msg);
+ getButton(IDialogConstants.OK_ID).setEnabled(false);
+ }
+ }
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setSize(SIZE_WIDTH, SIZE_HEIGHT);
+ Point size = shell.getParent().getShell().getSize();
+ shell.setLocation((size.x - SIZE_WIDTH)/2, (size.y - SIZE_HEIGHT)/2);
+ shell.setText(MSG_TITLE);
+ }
+
+ private ILabelProvider getLabelProvider() {
+ try {
+ LabelProviderService service = registry.getService(LabelProviderService.class);
+ if (service != null)
+ return service.getLabelProvider();
+ }
+ catch (ServiceException e) { }
+ return null;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ChildRule.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ChildRule.svg
new file mode 100755
index 00000000000..df1f68eebf1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ChildRule.svg
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="rule_child.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\cviewpoint.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.24410375"
+ inkscape:cx="1591.3792"
+ inkscape:cy="-208.74877"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Element"
+ style="display:inline">
+ <g
+ id="g3007"
+ transform="matrix(0.55555556,0,0,0.55555556,26.666666,38.44444)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect3948"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect3948-5"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect3984"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3997"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path3999"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <rect
+ style="fill:#c8c8c8;fill-opacity:1;stroke:#505050;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3014"
+ width="600"
+ height="200"
+ x="360"
+ y="754" />
+ <path
+ style="fill:none;stroke:#ff5000;stroke-width:60;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:120, 60;stroke-dashoffset:0"
+ d="m 350,874 -160,0 0,-300"
+ id="path3786"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ElementImport.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ElementImport.svg
new file mode 100755
index 00000000000..092e2903e84
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ElementImport.svg
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="PapyrusDiagram.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\import.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.34521484"
+ inkscape:cx="553.90512"
+ inkscape:cy="756.42382"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="142"
+ inkscape:window-y="116"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline"
+ sodipodi:insensitive="true">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3948"
+ width="880"
+ height="780"
+ x="70"
+ y="174" />
+ <rect
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3948-5"
+ width="880"
+ height="180"
+ x="70"
+ y="169" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3984"
+ width="350"
+ height="150"
+ x="160"
+ y="424" />
+ <rect
+ y="714"
+ x="510"
+ height="150"
+ width="350"
+ id="rect3997"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 250,574 0,225 260,0"
+ id="path3999"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer1"
+ inkscape:label="Import"
+ style="display:inline">
+ <path
+ style="fill:#009600;fill-opacity:1;stroke:none"
+ d="M 173.66714,313.39139 388.79527,686.00423 761.40811,470.87611 543.52198,437.69126 C 591.25878,259.53507 805.51507,85.617118 1004.9441,32.180244 764.68554,-32.196808 385.4246,134.35246 323.33011,366.09224 z"
+ id="path3012"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none"
+ sodipodi:insensitive="true">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ModelRule.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ModelRule.svg
new file mode 100755
index 00000000000..aa5342a2568
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/ModelRule.svg
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="rule_model.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\icons\rule_model_tool.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35355339"
+ inkscape:cx="-137.87568"
+ inkscape:cy="740.22194"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Element"
+ style="display:inline">
+ <rect
+ style="fill:#c8c8c8;fill-opacity:1;stroke:#505050;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3014"
+ width="600"
+ height="200"
+ x="70"
+ y="694" />
+ <path
+ style="fill:none;fill-opacity:0.47058823999999999;stroke:#6464ff;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 355,364 585,0 -270,330 -600,0 z"
+ id="rect3831"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path3834"
+ d="m 355,769 585,0 -270,125 -600,0 z"
+ style="fill:none;fill-opacity:0.47058823999999999;stroke:#6464ff;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ style="fill:none;fill-opacity:0.47058823999999999;stroke:#6464ff;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="M 670,694 940,364 940,769 670,894 z"
+ id="path3836"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:none;fill-opacity:0.47058823999999999;stroke:#6464ff;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ d="M 70,694 355,364 355,769 70,894 z"
+ id="path3836-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <g
+ style="display:inline;opacity:1"
+ id="g3007"
+ transform="matrix(0.66666667,0,0,0.66666667,310,131.33333)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect3948"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect3948-5"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect3984"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3997"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path3999"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:inline">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/OwningRule.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/OwningRule.svg
new file mode 100755
index 00000000000..b9fa186a840
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/OwningRule.svg
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="rule_owning.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\cviewpoint.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.34521484"
+ inkscape:cx="502.81712"
+ inkscape:cy="418.7586"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="223"
+ inkscape:window-y="84"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Element"
+ style="display:inline">
+ <g
+ id="g3007"
+ transform="matrix(0.55555556,0,0,0.55555556,416.66667,393.47427)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect3948"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect3948-5"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect3984"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3997"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path3999"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <rect
+ style="fill:#c8c8c8;fill-opacity:1;stroke:#505050;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3014"
+ width="600"
+ height="200"
+ x="60"
+ y="94" />
+ <path
+ style="fill:none;stroke:#ff5000;stroke-width:60;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:120,60;stroke-dashoffset:0"
+ d="m 150,304 0,520 300,0"
+ id="path3786"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PaletteRule.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PaletteRule.svg
new file mode 100755
index 00000000000..fc4678b0f8c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PaletteRule.svg
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="rule_palette.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\icons\rule_palette.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3828">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3830" />
+ <stop
+ style="stop-color:#c86400;stop-opacity:1;"
+ offset="1"
+ id="stop3832" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3808">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3810" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1"
+ id="stop3812" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3814"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3821"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3828"
+ id="radialGradient3834"
+ cx="432.33946"
+ cy="173.08061"
+ fx="432.33946"
+ fy="173.08061"
+ r="254.18953"
+ gradientTransform="matrix(0.83091287,0,0,0.09232366,-152.14788,832.58053)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3836"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3844"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3828"
+ id="radialGradient3846"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.83091287,0,0,0.09232366,-152.14788,832.58053)"
+ cx="432.33946"
+ cy="173.08061"
+ fx="432.33946"
+ fy="173.08061"
+ r="254.18953" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.69042968"
+ inkscape:cx="339.29467"
+ inkscape:cy="548.40518"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Element"
+ style="display:inline">
+ <g
+ style="display:inline"
+ id="g3007"
+ transform="matrix(0.66666667,0,0,0.66666667,21,261.33334)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect3948"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect3948-5"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect3984"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3997"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path3999"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ id="g3838"
+ transform="matrix(1.1034962,-0.02308912,0.02308912,1.1034962,-130.58439,-2.2648535)">
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="rect3800"
+ d="m 890.67392,153.77183 c 52.54032,-13.98518 89.85969,24.32661 79.60087,83.75273 l -352.7346,408.7136 c -42.45634,-1.46691 -47.97342,-1.89935 -51.85945,-55.76315 z"
+ style="fill:#c86400;fill-opacity:1;stroke:none" />
+ <path
+ sodipodi:nodetypes="scsss"
+ inkscape:connector-curvature="0"
+ id="path3802"
+ d="m 668.27631,691.68132 c -15.19666,56.7147 -134.54047,191.90845 -191.25517,176.71179 -37.88584,-9.40316 55.27777,-64.53184 27.79618,-190.15209 -12.54823,-57.35882 31.56925,-131.96336 88.28393,-116.7667 56.7147,15.19666 90.37171,73.49232 75.17506,130.207 z"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ <path
+ transform="matrix(2.8237478,0.75662094,-0.75662094,2.8237478,-941.22566,-1872.8999)"
+ d="m 743.01555,694.49506 c 0,9.19901 -7.45728,16.65629 -16.6563,16.65629 -9.19901,0 -16.65629,-7.45728 -16.65629,-16.65629 0,-9.19902 7.45728,-16.6563 16.65629,-16.6563 9.19902,0 16.6563,7.45728 16.6563,16.6563 z"
+ sodipodi:ry="16.656294"
+ sodipodi:rx="16.656294"
+ sodipodi:cy="694.49506"
+ sodipodi:cx="726.35925"
+ id="path3806"
+ style="fill:url(#radialGradient3844);fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <rect
+ transform="matrix(0.6390587,-0.76915797,0.76915797,0.6390587,0,0)"
+ y="825.09222"
+ x="-4.12082"
+ height="46.935413"
+ width="422.4187"
+ id="rect3826"
+ style="fill:url(#radialGradient3846);fill-opacity:1;stroke:none" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusConfiguration.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusConfiguration.svg
new file mode 100755
index 00000000000..6701bd91c06
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusConfiguration.svg
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="conf_file.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\conf_file.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3774"
+ gradientUnits="userSpaceOnUse"
+ x1="444.28577"
+ y1="971.64789"
+ x2="444.28577"
+ y2="201.53497" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3776"
+ gradientUnits="userSpaceOnUse"
+ x1="444.28577"
+ y1="971.64789"
+ x2="444.28577"
+ y2="201.53497" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3783"
+ id="linearGradient3789"
+ x1="758.57141"
+ y1="343.79074"
+ x2="948.75952"
+ y2="153.60266"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.25,0,0,1.25,-222.5,-53.090544)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="610.88814"
+ inkscape:cy="370.72485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="385"
+ inkscape:window-y="114"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="File"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-28.36218)"
+ style="display:inline">
+ <path
+ style="fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3774);stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 250.55206,152.91425 469.44797,0 229.44797,229.44793 -6e-5,619.44792 -698.89588,0 z"
+ id="rect2985"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="fill:url(#linearGradient3789);fill-opacity:1;stroke:none"
+ d="m 715,137.36218 250,250 -250,0 z"
+ id="rect3780"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <g
+ id="g3910">
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="rect3797"
+ d="m 333.91746,576.89245 331.1681,-11.03899 c 12.10305,20.96311 10.59675,36.84058 0,55.19468 l -331.1681,-11.03888 c -6.07195,-10.5169 -7.99455,-19.26985 0,-33.11681 z"
+ inkscape:transform-center-x="-280"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ transform="matrix(0.98227829,0,0,0.98227829,-230.56514,-74.217723)"
+ d="m 512.85715,679.71429 a 84.285713,84.285713 0 1 1 -168.57142,0 84.285713,84.285713 0 1 1 168.57142,0 z"
+ sodipodi:ry="84.285713"
+ sodipodi:rx="84.285713"
+ sodipodi:cy="679.71429"
+ sodipodi:cx="428.57144"
+ id="path3027"
+ style="fill:#3232ff;fill-opacity:0.99607842999999996;fill-rule:evenodd;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10.18041435;stroke-miterlimit:4;stroke-dasharray:none"
+ sodipodi:type="arc" />
+ <path
+ inkscape:transform-center-y="-143.60032"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none"
+ inkscape:transform-center-x="-243.7231"
+ d="M 306.62797,508.16338 587.90846,333.01926 c 20.96312,12.10306 27.59734,26.60652 27.59734,47.8 L 323.18637,536.84337 c -10.51692,-6.07194 -16.5584,-12.69091 -16.5584,-28.67999 z"
+ id="path3856"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="-243.72307"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none"
+ inkscape:transform-center-x="-143.60036"
+ d="m 248.63004,462.28699 156.02398,-292.3195 c 24.20614,0 37.20327,9.24325 47.80001,27.59734 l -175.144,281.28057 c -12.14388,0 -20.68545,-2.71145 -28.67999,-16.55841 z"
+ id="path3862"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="143.60036"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none"
+ inkscape:transform-center-x="-243.72307"
+ d="m 323.18631,650.05833 292.31949,156.024 c 0,24.20612 -9.24324,37.20325 -27.59734,47.80001 l -281.28055,-175.144 c -2e-5,-12.14389 2.71144,-20.68545 16.5584,-28.68001 z"
+ id="path3864"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="243.72308"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;display:inline;stroke-opacity:1;stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none"
+ inkscape:transform-center-x="-143.60031"
+ d="m 277.30993,708.05626 175.1441,281.28046 c -12.10307,20.96318 -26.60651,27.59738 -47.80001,27.59738 L 248.62992,724.61466 c 6.07194,-10.5169 12.69091,-16.5584 28.68001,-16.5584 z"
+ id="path3866"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusDiagram.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusDiagram.svg
new file mode 100755
index 00000000000..806b230789b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusDiagram.svg
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="diagram.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\cviewpoint.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.34521484"
+ inkscape:cx="544.14833"
+ inkscape:cy="630.68176"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="385"
+ inkscape:window-y="114"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3948"
+ width="880"
+ height="780"
+ x="70"
+ y="174" />
+ <rect
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3948-5"
+ width="880"
+ height="180"
+ x="70"
+ y="169" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3984"
+ width="350"
+ height="150"
+ x="160"
+ y="424" />
+ <rect
+ y="714"
+ x="510"
+ height="150"
+ width="350"
+ id="rect3997"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 250,574 0,225 260,0"
+ id="path3999"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusSyncTable.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusSyncTable.svg
new file mode 100755
index 00000000000..29364e1449a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusSyncTable.svg
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="PapyrusSyncTable.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\PapyrusSyncTable.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ <radialGradient
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)"
+ gradientUnits="userSpaceOnUse"
+ r="150"
+ fy="480.05185"
+ fx="1127.8128"
+ cy="480.05185"
+ cx="1127.8128"
+ id="radialGradient3946-2"
+ xlink:href="#linearGradient3940-5"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-2"
+ xlink:href="#linearGradient3765-2"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-3"
+ xlink:href="#linearGradient3757-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-1">
+ <stop
+ id="stop3759-4"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-2"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-2">
+ <stop
+ id="stop3767-7"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-6"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-1">
+ <stop
+ id="stop3785-1"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-5"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940-5">
+ <stop
+ id="stop3942-1"
+ offset="0"
+ style="stop-color:#ff6400;stop-opacity:1;" />
+ <stop
+ id="stop3944-7"
+ offset="1"
+ style="stop-color:#ffd200;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976-2">
+ <stop
+ id="stop3978-4"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3980-5"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)"
+ gradientUnits="userSpaceOnUse"
+ r="150"
+ fy="480.05185"
+ fx="1127.8128"
+ cy="480.05185"
+ cx="1127.8128"
+ id="radialGradient3946-3"
+ xlink:href="#linearGradient3940-3"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-9"
+ xlink:href="#linearGradient3765-1"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-7"
+ xlink:href="#linearGradient3757-7"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-7">
+ <stop
+ id="stop3759-42"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-7"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-1">
+ <stop
+ id="stop3767-3"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-8"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-3">
+ <stop
+ id="stop3785-4"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-1"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940-3">
+ <stop
+ id="stop3942-12"
+ offset="0"
+ style="stop-color:#ff6400;stop-opacity:1;" />
+ <stop
+ id="stop3944-3"
+ offset="1"
+ style="stop-color:#ffd200;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976-7">
+ <stop
+ id="stop3978-9"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3980-54"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(1.25,0,0,1.25,-222.5,-53.090544)"
+ gradientUnits="userSpaceOnUse"
+ y2="153.60266"
+ x2="948.75952"
+ y1="343.79074"
+ x1="758.57141"
+ id="linearGradient3789"
+ xlink:href="#linearGradient3783-5"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="201.53497"
+ x2="444.28577"
+ y1="971.64789"
+ x1="444.28577"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3776"
+ xlink:href="#linearGradient3765-0"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="201.53497"
+ x2="444.28577"
+ y1="971.64789"
+ x1="444.28577"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3774"
+ xlink:href="#linearGradient3757-3"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-4"
+ xlink:href="#linearGradient3765-0"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-34"
+ xlink:href="#linearGradient3757-3"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-3">
+ <stop
+ id="stop3759-8"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-9"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-0">
+ <stop
+ id="stop3767-0"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-61"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-5">
+ <stop
+ id="stop3785-0"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-9"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.69042968"
+ inkscape:cx="442.32282"
+ inkscape:cy="483.86327"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect3914-9-6-4"
+ width="440"
+ height="602"
+ x="510"
+ y="352" />
+ <rect
+ style="fill:#ffffff;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline;fill-opacity:1"
+ id="rect3914-9-6"
+ width="440"
+ height="602"
+ x="69.26667"
+ y="353" />
+ <rect
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect3914-9"
+ width="880"
+ height="200"
+ x="70"
+ y="564" />
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#ff3232;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3948"
+ width="880"
+ height="780"
+ x="70"
+ y="174" />
+ <rect
+ style="fill:#ffc8c8;fill-opacity:1;stroke:#ff3232;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3948-5"
+ width="880"
+ height="180"
+ x="70"
+ y="174" />
+ <path
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#5050ff;stroke-width:23.9427948;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 930.44728,453.79915 -89.78548,0 0,-418.998891 -179.57096,0 0,418.998891 -89.78548,0 179.57096,179.57096 z"
+ id="rect4168"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#5050ff;stroke-width:23.9427948;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ d="m 451.59139,214.37121 -89.78548,0 0,418.9989 -179.57095,0 0,-418.9989 -89.785484,0 L 272.02043,34.800247 z"
+ id="rect4168-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusTable.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusTable.svg
new file mode 100755
index 00000000000..920a202f7ba
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusTable.svg
@@ -0,0 +1,440 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="PapyrusTable.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\PapyrusTable.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ <radialGradient
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)"
+ gradientUnits="userSpaceOnUse"
+ r="150"
+ fy="480.05185"
+ fx="1127.8128"
+ cy="480.05185"
+ cx="1127.8128"
+ id="radialGradient3946-2"
+ xlink:href="#linearGradient3940-5"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-2"
+ xlink:href="#linearGradient3765-2"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-3"
+ xlink:href="#linearGradient3757-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-1">
+ <stop
+ id="stop3759-4"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-2"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-2">
+ <stop
+ id="stop3767-7"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-6"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-1">
+ <stop
+ id="stop3785-1"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-5"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940-5">
+ <stop
+ id="stop3942-1"
+ offset="0"
+ style="stop-color:#ff6400;stop-opacity:1;" />
+ <stop
+ id="stop3944-7"
+ offset="1"
+ style="stop-color:#ffd200;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976-2">
+ <stop
+ id="stop3978-4"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3980-5"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)"
+ gradientUnits="userSpaceOnUse"
+ r="150"
+ fy="480.05185"
+ fx="1127.8128"
+ cy="480.05185"
+ cx="1127.8128"
+ id="radialGradient3946-3"
+ xlink:href="#linearGradient3940-3"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-9"
+ xlink:href="#linearGradient3765-1"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-7"
+ xlink:href="#linearGradient3757-7"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-7">
+ <stop
+ id="stop3759-42"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-7"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-1">
+ <stop
+ id="stop3767-3"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-8"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-3">
+ <stop
+ id="stop3785-4"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-1"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940-3">
+ <stop
+ id="stop3942-12"
+ offset="0"
+ style="stop-color:#ff6400;stop-opacity:1;" />
+ <stop
+ id="stop3944-3"
+ offset="1"
+ style="stop-color:#ffd200;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976-7">
+ <stop
+ id="stop3978-9"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3980-54"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(1.25,0,0,1.25,-222.5,-53.090544)"
+ gradientUnits="userSpaceOnUse"
+ y2="153.60266"
+ x2="948.75952"
+ y1="343.79074"
+ x1="758.57141"
+ id="linearGradient3789"
+ xlink:href="#linearGradient3783-5"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="201.53497"
+ x2="444.28577"
+ y1="971.64789"
+ x1="444.28577"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3776"
+ xlink:href="#linearGradient3765-0"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="201.53497"
+ x2="444.28577"
+ y1="971.64789"
+ x1="444.28577"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3774"
+ xlink:href="#linearGradient3757-3"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3771-4"
+ xlink:href="#linearGradient3765-0"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="163.09605"
+ x2="604.28577"
+ y1="971.64789"
+ x1="444.28577"
+ id="linearGradient3763-34"
+ xlink:href="#linearGradient3757-3"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3757-3">
+ <stop
+ id="stop3759-8"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3761-9"
+ offset="1"
+ style="stop-color:#aaaaaa;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765-0">
+ <stop
+ id="stop3767-0"
+ offset="0"
+ style="stop-color:#e6e6ff;stop-opacity:1;" />
+ <stop
+ id="stop3769-61"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783-5">
+ <stop
+ id="stop3785-0"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop3787-9"
+ offset="1"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.48820751"
+ inkscape:cx="675.63274"
+ inkscape:cy="458.60193"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
+ id="rect3914-9-6-1"
+ width="440"
+ height="602"
+ x="510"
+ y="352" />
+ <rect
+ style="fill:#ffffff;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline;fill-opacity:1"
+ id="rect3914-9-6"
+ width="440"
+ height="602"
+ x="69.26667"
+ y="353" />
+ <rect
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline;fill-opacity:1"
+ id="rect3914-9"
+ width="880"
+ height="200"
+ x="70"
+ y="564" />
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#ff3232;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3948"
+ width="880"
+ height="780"
+ x="70"
+ y="174" />
+ <rect
+ style="fill:#ffc8c8;fill-opacity:1;stroke:#ff3232;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3948-5"
+ width="880"
+ height="180"
+ x="70"
+ y="174" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusView.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusView.svg
new file mode 100755
index 00000000000..35dfe2c70d0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusView.svg
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="view.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\icons\view_tool.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.34521484"
+ inkscape:cx="544.14833"
+ inkscape:cy="630.68176"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="385"
+ inkscape:window-y="114"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <g
+ id="g4001"
+ transform="matrix(0.80568435,0,0,0.80568406,-18.341061,217.32057)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect3948"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect3948-5"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect3984"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3997"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path3999"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="matrix(0.80568435,0,0,0.80568406,101.65899,97.320558)"
+ id="g4008">
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect4010"
+ width="880"
+ height="780"
+ x="70"
+ y="174" />
+ <rect
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect4012"
+ width="880"
+ height="180"
+ x="70"
+ y="169" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect4014"
+ width="350"
+ height="150"
+ x="160"
+ y="424" />
+ <rect
+ y="714"
+ x="510"
+ height="150"
+ width="350"
+ id="rect4016"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 250,574 0,225 260,0"
+ id="path4018"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ id="g4020"
+ transform="matrix(0.80568435,0,0,0.80568406,221.65903,-22.679442)">
+ <rect
+ y="174"
+ x="70"
+ height="780"
+ width="880"
+ id="rect4022"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ y="169"
+ x="70"
+ height="180"
+ width="880"
+ id="rect4024"
+ style="fill:#c8c8ff;fill-opacity:1;stroke:#000096;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <rect
+ y="424"
+ x="160"
+ height="150"
+ width="350"
+ id="rect4026"
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <rect
+ style="fill:#ffc800;fill-opacity:1;stroke:#ff6400;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect4028"
+ width="350"
+ height="150"
+ x="510"
+ y="714" />
+ <path
+ sodipodi:nodetypes="ccc"
+ inkscape:connector-curvature="0"
+ id="path4030"
+ d="m 250,574 0,225 260,0"
+ style="fill:none;stroke:#505050;stroke-width:20;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusViewpoint.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusViewpoint.svg
new file mode 100755
index 00000000000..a43b9631f14
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PapyrusViewpoint.svg
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="viewpoint.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\cviewpoint.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="610.88814"
+ inkscape:cy="370.72485"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer3"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="385"
+ inkscape:window-y="114"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Viewpoint"
+ style="display:inline">
+ <g
+ id="g3910"
+ transform="matrix(1.1085613,0,0,1.1085613,86.240263,-133.87659)">
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="rect3797"
+ d="m 333.91746,576.89245 331.1681,-11.03899 c 12.10305,20.96311 10.59675,36.84058 0,55.19468 l -331.1681,-11.03888 c -6.07195,-10.5169 -7.99455,-19.26985 0,-33.11681 z"
+ inkscape:transform-center-x="-280"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <path
+ transform="matrix(0.98227829,0,0,0.98227829,-230.56514,-74.217723)"
+ d="m 512.85715,679.71429 a 84.285713,84.285713 0 1 1 -168.57142,0 84.285713,84.285713 0 1 1 168.57142,0 z"
+ sodipodi:ry="84.285713"
+ sodipodi:rx="84.285713"
+ sodipodi:cy="679.71429"
+ sodipodi:cx="428.57144"
+ id="path3027"
+ style="fill:#3232ff;fill-opacity:0.99607843;fill-rule:evenodd;stroke:#000000;stroke-width:10.1804142;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ sodipodi:type="arc" />
+ <path
+ inkscape:transform-center-y="-143.60032"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-x="-243.7231"
+ d="M 306.62797,508.16338 587.90846,333.01926 c 20.96312,12.10306 27.59734,26.60652 27.59734,47.8 L 323.18637,536.84337 c -10.51692,-6.07194 -16.5584,-12.69091 -16.5584,-28.67999 z"
+ id="path3856"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="-243.72307"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-x="-143.60036"
+ d="m 248.63004,462.28699 156.02398,-292.3195 c 24.20614,0 37.20327,9.24325 47.80001,27.59734 l -175.144,281.28057 c -12.14388,0 -20.68545,-2.71145 -28.67999,-16.55841 z"
+ id="path3862"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="143.60036"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-x="-243.72307"
+ d="m 323.18631,650.05833 292.31949,156.024 c 0,24.20612 -9.24324,37.20325 -27.59734,47.80001 l -281.28055,-175.144 c -2e-5,-12.14389 2.71144,-20.68545 16.5584,-28.68001 z"
+ id="path3864"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:transform-center-y="243.72308"
+ style="fill:#3232ff;fill-opacity:1;stroke:#000000;stroke-width:10;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ inkscape:transform-center-x="-143.60031"
+ d="m 277.30993,708.05626 175.1441,281.28046 c -12.10307,20.96318 -26.60651,27.59738 -47.80001,27.59738 L 248.62992,724.61466 c 6.07194,-10.5169 12.69091,-16.5584 28.68001,-16.5584 z"
+ id="path3866"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PathElement.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PathElement.svg
new file mode 100755
index 00000000000..b660cd491e0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/PathElement.svg
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="path.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\icons\path_tool.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.34521484"
+ inkscape:cx="544.14833"
+ inkscape:cy="630.68176"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer4"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1370"
+ inkscape:window-height="894"
+ inkscape:window-x="236"
+ inkscape:window-y="77"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="Element">
+ <rect
+ style="fill:#64c8ff;fill-opacity:1;stroke:#6464ff;stroke-width:25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3984"
+ width="437.5"
+ height="187.5"
+ x="82.5"
+ y="261.50003" />
+ <rect
+ y="624"
+ x="520"
+ height="187.5"
+ width="437.5"
+ id="rect3997"
+ style="fill:#64c8ff;fill-opacity:1;stroke:#6464ff;stroke-width:25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <path
+ style="fill:none;stroke:#505050;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ d="m 195.00001,449.00003 0,281.25 325,0"
+ id="path3999"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:none">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/Stakeholder.svg b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/Stakeholder.svg
new file mode 100755
index 00000000000..f123888b125
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/icons/svg/Stakeholder.svg
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1024"
+ height="1024"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="stakeholder.svg"
+ inkscape:export-filename="C:\Users\LW238780\Desktop\icons\stakeholder_tool.png"
+ inkscape:export-xdpi="1.41"
+ inkscape:export-ydpi="1.41">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3828">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3830" />
+ <stop
+ style="stop-color:#c86400;stop-opacity:1;"
+ offset="1"
+ id="stop3832" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3808">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3810" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1"
+ id="stop3812" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3976">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3978" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3980" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3940">
+ <stop
+ style="stop-color:#ff6400;stop-opacity:1;"
+ offset="0"
+ id="stop3942" />
+ <stop
+ style="stop-color:#ffd200;stop-opacity:1;"
+ offset="1"
+ id="stop3944" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3783">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3785" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="1"
+ id="stop3787" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3765">
+ <stop
+ style="stop-color:#e6e6ff;stop-opacity:1;"
+ offset="0"
+ id="stop3767" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3769" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3757">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3759" />
+ <stop
+ style="stop-color:#aaaaaa;stop-opacity:1;"
+ offset="1"
+ id="stop3761" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3757"
+ id="linearGradient3763"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3765"
+ id="linearGradient3771"
+ x1="444.28577"
+ y1="971.64789"
+ x2="604.28577"
+ y2="163.09605"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3940"
+ id="radialGradient3946"
+ cx="1127.8128"
+ cy="480.05185"
+ fx="1127.8128"
+ fy="480.05185"
+ r="150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2835941,0,0,1.2835941,-647.65383,-392.19171)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3814"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3821"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3828"
+ id="radialGradient3834"
+ cx="432.33946"
+ cy="173.08061"
+ fx="432.33946"
+ fy="173.08061"
+ r="254.18953"
+ gradientTransform="matrix(0.83091287,0,0,0.09232366,-152.14788,832.58053)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3836"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3808"
+ id="radialGradient3844"
+ gradientUnits="userSpaceOnUse"
+ cx="726.35925"
+ cy="694.49506"
+ fx="726.35925"
+ fy="694.49506"
+ r="16.656294" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3828"
+ id="radialGradient3846"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.83091287,0,0,0.09232366,-152.14788,832.58053)"
+ cx="432.33946"
+ cy="173.08061"
+ fx="432.33946"
+ fy="173.08061"
+ r="254.18953" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.69042968"
+ inkscape:cx="113.34842"
+ inkscape:cy="548.79841"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer2"
+ showgrid="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1178"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Element"
+ style="display:inline">
+ <g
+ id="g3838"
+ transform="matrix(0.20865205,0.84939318,0.84939318,-0.20865205,130.38284,25.1294)">
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="rect3800"
+ d="m 890.67392,153.77183 c 52.54032,-13.98518 89.85969,24.32661 79.60087,83.75273 l -352.7346,408.7136 c -42.45634,-1.46691 -47.97342,-1.89935 -51.85945,-55.76315 z"
+ style="fill:#c86400;fill-opacity:1;stroke:none" />
+ <path
+ sodipodi:nodetypes="scsss"
+ inkscape:connector-curvature="0"
+ id="path3802"
+ d="m 668.27631,691.68132 c -15.19666,56.7147 -134.54047,191.90845 -191.25517,176.71179 -37.88584,-9.40316 55.27777,-64.53184 27.79618,-190.15209 -12.54823,-57.35882 31.56925,-131.96336 88.28393,-116.7667 56.7147,15.19666 90.37171,73.49232 75.17506,130.207 z"
+ style="fill:#000000;fill-opacity:1;stroke:none" />
+ <path
+ transform="matrix(2.8237478,0.75662094,-0.75662094,2.8237478,-941.22566,-1872.8999)"
+ d="m 743.01555,694.49506 c 0,9.19901 -7.45728,16.65629 -16.6563,16.65629 -9.19901,0 -16.65629,-7.45728 -16.65629,-16.65629 0,-9.19902 7.45728,-16.6563 16.65629,-16.6563 9.19902,0 16.6563,7.45728 16.6563,16.6563 z"
+ sodipodi:ry="16.656294"
+ sodipodi:rx="16.656294"
+ sodipodi:cy="694.49506"
+ sodipodi:cx="726.35925"
+ id="path3806"
+ style="fill:url(#radialGradient3844);fill-opacity:1;stroke:none"
+ sodipodi:type="arc" />
+ <rect
+ transform="matrix(0.6390587,-0.76915797,0.76915797,0.6390587,0,0)"
+ y="825.09222"
+ x="-4.12082"
+ height="46.935413"
+ width="422.4187"
+ id="rect3826"
+ style="fill:url(#radialGradient3846);fill-opacity:1;stroke:none" />
+ </g>
+ <g
+ id="g3809"
+ transform="matrix(1.0795454,0,0,1.0795454,-157.67046,-78.670449)">
+ <path
+ transform="matrix(1.3717145,0,0,1.3717145,-232.11912,-15.072822)"
+ d="m 643.07779,210.73833 c 0,60.39355 -48.95865,109.3522 -109.3522,109.3522 -60.39356,0 -109.35221,-48.95865 -109.35221,-109.3522 0,-60.39356 48.95865,-109.35221 109.35221,-109.35221 60.39355,0 109.3522,48.95865 109.3522,109.35221 z"
+ sodipodi:ry="109.3522"
+ sodipodi:rx="109.3522"
+ sodipodi:cy="210.73833"
+ sodipodi:cx="533.72559"
+ id="path3025"
+ style="fill:none;stroke:#000000;stroke-width:21.87043953;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path3027"
+ d="m 500,424 0,400"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path3033"
+ d="M 500,474 300,624"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path3035"
+ d="M 500,474 700,624"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path3037"
+ d="M 500,824 300,974"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ <path
+ sodipodi:nodetypes="cc"
+ inkscape:connector-curvature="0"
+ id="path3039"
+ d="M 500,824 700,974"
+ style="fill:none;stroke:#000000;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Tool"
+ style="display:inline">
+ <path
+ style="fill:url(#radialGradient3946);fill-opacity:1;stroke:#ff5000;stroke-width:14.92178059;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 748.65625,31.460876 0,141.195364 -141.19536,0 0,102.68751 141.19536,0 0,141.19536 102.68751,0 0,-141.19536 141.19535,0 0,-102.68751 -141.19535,0 0,-141.195364 -102.68751,0 z"
+ id="rect3919"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore
new file mode 100755
index 00000000000..fa114a399eb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="configuration" nsURI="http://www.eclipse.org/papyrus/infra/viewpoints/configuration"
+ nsPrefix="configuration">
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusConfiguration" eSuperTypes="../../org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore#//ArchitectureFramework">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="defaultStakeholder" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore#//Stakeholder"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="metamodel" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
+ eType="#//Category" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusViewpoint" eSuperTypes="../../org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore#//ArchitectureViewpoint">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PapyrusViewpoint"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusView" eSuperTypes="../../org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore#//ModelKind">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="icon" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//PapyrusView"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="profiles" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="modelRules" lowerBound="1"
+ upperBound="-1" eType="#//ModelRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which model elements can be the semantic element behind this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="owningRules" lowerBound="1"
+ upperBound="-1" eType="#//OwningRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which elements can be the syntactic owner of this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="implementationID" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="categories" upperBound="-1"
+ eType="#//Category"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusDiagram" eSuperTypes="#//PapyrusView">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customPalette" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="customStyle" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="childRules" upperBound="-1"
+ eType="#//ChildRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which model elements can be added as child of the origin through this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="paletteRules" upperBound="-1"
+ eType="#//PaletteRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which palette elements should be available for this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
+ eType="#//ElementImport" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusSyncTable" eSuperTypes="#//PapyrusView"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusTable" eSuperTypes="#//PapyrusView">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="configuration" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Rule" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="permit" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ModelRule" eSuperTypes="#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stereotypes" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="autoSelectPath" upperBound="-1"
+ eType="#//PathElement" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OwningRule" eSuperTypes="#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stereotypes" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ChildRule" eSuperTypes="#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stereotypes" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="origin" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="insertionPath" upperBound="-1"
+ eType="#//PathElement" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PaletteRule" eSuperTypes="#//Rule">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="element" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PathElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="feature" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="origin" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Category">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ElementImport">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="from" lowerBound="1" eType="#//PapyrusDiagram"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="element" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel
new file mode 100755
index 00000000000..7f05dae2503
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration/src"
+ modelPluginID="org.eclipse.papyrus.infra.viewpoints.configuration" modelName="Configuration"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel#//iso42010"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>configuration.ecore</foreignModel>
+ <genPackages prefix="Configuration" basePackage="org.eclipse.papyrus.infra.viewpoints"
+ disposableProviderFactory="true" ecorePackage="configuration.ecore#/">
+ <genClasses ecoreClass="configuration.ecore#//PapyrusConfiguration">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusConfiguration/defaultStakeholder"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusConfiguration/metamodel"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//PapyrusViewpoint">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusViewpoint/parent"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//PapyrusView"/>
+ <genClasses ecoreClass="configuration.ecore#//PapyrusDiagram">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/creationRules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/modelRules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/paletteRules"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//DiagramCreationRule">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//DiagramCreationRule/element"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//DiagramCreationRule/multiplicity"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//ModelRule">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//ModelRule/element"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//ModelRule/origin"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//ModelRule/insertionPath"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//PaletteRule">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//PaletteRule/element"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="configuration.ecore#//Rule">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//Rule/permit"/>
+ </genClasses>
+ <genClasses ecoreClass="configuration.ecore#//PathElement">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PathElement/feature"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference configuration.ecore#//PathElement/origin"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference configuration.ecore#//PathElement/target"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.properties
new file mode 100755
index 00000000000..bb566a34bae
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.properties
@@ -0,0 +1,16 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Configuration (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.xml
new file mode 100755
index 00000000000..9debbf64776
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated configuration -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/viewpoints/configuration"
+ class="org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage"
+ genModel="model/configuration.genmodel"/>
+ </extension>
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java
new file mode 100755
index 00000000000..f99b732e85c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Category.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Category.java
new file mode 100755
index 00000000000..58c04e1e2f5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Category.java
@@ -0,0 +1,61 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Category</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.Category#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getCategory()
+ * @model
+ * @generated
+ */
+public interface Category extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getCategory_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Category#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // Category
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ChildRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ChildRule.java
new file mode 100755
index 00000000000..685b7a93fc5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ChildRule.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Child Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getInsertionPath <em>Insertion Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getChildRule()
+ * @model
+ * @generated
+ */
+public interface ChildRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getChildRule_Element()
+ * @model
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getElement <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Stereotypes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stereotypes</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stereotypes</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getChildRule_Stereotypes()
+ * @model
+ * @generated
+ */
+ EList<EClass> getStereotypes();
+
+ /**
+ * Returns the value of the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Origin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Origin</em>' reference.
+ * @see #setOrigin(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getChildRule_Origin()
+ * @model
+ * @generated
+ */
+ EClass getOrigin();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getOrigin <em>Origin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Origin</em>' reference.
+ * @see #getOrigin()
+ * @generated
+ */
+ void setOrigin(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Insertion Path</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Insertion Path</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Insertion Path</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getChildRule_InsertionPath()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PathElement> getInsertionPath();
+
+} // ChildRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
new file mode 100755
index 00000000000..3a6909c1508
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
@@ -0,0 +1,161 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage
+ * @generated
+ */
+public interface ConfigurationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Configuration</em>'.
+ * @generated
+ */
+ PapyrusConfiguration createPapyrusConfiguration();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Viewpoint</em>'.
+ * @generated
+ */
+ PapyrusViewpoint createPapyrusViewpoint();
+
+ /**
+ * Returns a new object of class '<em>Papyrus View</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus View</em>'.
+ * @generated
+ */
+ PapyrusView createPapyrusView();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Diagram</em>'.
+ * @generated
+ */
+ PapyrusDiagram createPapyrusDiagram();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Sync Table</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Sync Table</em>'.
+ * @generated
+ */
+ PapyrusSyncTable createPapyrusSyncTable();
+
+ /**
+ * Returns a new object of class '<em>Papyrus Table</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus Table</em>'.
+ * @generated
+ */
+ PapyrusTable createPapyrusTable();
+
+ /**
+ * Returns a new object of class '<em>Model Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Model Rule</em>'.
+ * @generated
+ */
+ ModelRule createModelRule();
+
+ /**
+ * Returns a new object of class '<em>Owning Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Owning Rule</em>'.
+ * @generated
+ */
+ OwningRule createOwningRule();
+
+ /**
+ * Returns a new object of class '<em>Child Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Child Rule</em>'.
+ * @generated
+ */
+ ChildRule createChildRule();
+
+ /**
+ * Returns a new object of class '<em>Palette Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Palette Rule</em>'.
+ * @generated
+ */
+ PaletteRule createPaletteRule();
+
+ /**
+ * Returns a new object of class '<em>Path Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Path Element</em>'.
+ * @generated
+ */
+ PathElement createPathElement();
+
+ /**
+ * Returns a new object of class '<em>Category</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Category</em>'.
+ * @generated
+ */
+ Category createCategory();
+
+ /**
+ * Returns a new object of class '<em>Element Import</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Element Import</em>'.
+ * @generated
+ */
+ ElementImport createElementImport();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ConfigurationPackage getConfigurationPackage();
+
+} //ConfigurationFactory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
new file mode 100755
index 00000000000..25d0f1d2ee7
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
@@ -0,0 +1,2230 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ConfigurationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "configuration";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/viewpoints/configuration";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "configuration";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl <em>Papyrus Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusConfiguration()
+ * @generated
+ */
+ int PAPYRUS_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Stakeholders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__STAKEHOLDERS = Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS;
+
+ /**
+ * The feature id for the '<em><b>Viewpoints</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__VIEWPOINTS = Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS;
+
+ /**
+ * The feature id for the '<em><b>Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__RULES = Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__CONCERNS = Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS;
+
+ /**
+ * The feature id for the '<em><b>Default Stakeholder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER = Iso42010Package.ARCHITECTURE_FRAMEWORK_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Metamodel</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__METAMODEL = Iso42010Package.ARCHITECTURE_FRAMEWORK_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION__CATEGORIES = Iso42010Package.ARCHITECTURE_FRAMEWORK_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION_FEATURE_COUNT = Iso42010Package.ARCHITECTURE_FRAMEWORK_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Papyrus Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_CONFIGURATION_OPERATION_COUNT = Iso42010Package.ARCHITECTURE_FRAMEWORK_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewpointImpl <em>Papyrus Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewpointImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusViewpoint()
+ * @generated
+ */
+ int PAPYRUS_VIEWPOINT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__NAME = Iso42010Package.ARCHITECTURE_VIEWPOINT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__AFFECTED_BY = Iso42010Package.ARCHITECTURE_VIEWPOINT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Model Kinds</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__MODEL_KINDS = Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__GOVERNS = Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS;
+
+ /**
+ * The feature id for the '<em><b>Frames</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__FRAMES = Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT__PARENT = Iso42010Package.ARCHITECTURE_VIEWPOINT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT_FEATURE_COUNT = Iso42010Package.ARCHITECTURE_VIEWPOINT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Papyrus Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEWPOINT_OPERATION_COUNT = Iso42010Package.ARCHITECTURE_VIEWPOINT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl <em>Papyrus View</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusView()
+ * @generated
+ */
+ int PAPYRUS_VIEW = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__NAME = Iso42010Package.MODEL_KIND__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__AFFECTED_BY = Iso42010Package.MODEL_KIND__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__GOVERNS = Iso42010Package.MODEL_KIND__GOVERNS;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__VIEWPOINT = Iso42010Package.MODEL_KIND__VIEWPOINT;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__ICON = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__PARENT = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Profiles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__PROFILES = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Model Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__MODEL_RULES = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Owning Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__OWNING_RULES = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__IMPLEMENTATION_ID = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW__CATEGORIES = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 6;
+
+ /**
+ * The number of structural features of the '<em>Papyrus View</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_FEATURE_COUNT = Iso42010Package.MODEL_KIND_FEATURE_COUNT + 7;
+
+ /**
+ * The number of operations of the '<em>Papyrus View</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_OPERATION_COUNT = Iso42010Package.MODEL_KIND_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl <em>Papyrus Diagram</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusDiagram()
+ * @generated
+ */
+ int PAPYRUS_DIAGRAM = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__NAME = PAPYRUS_VIEW__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__AFFECTED_BY = PAPYRUS_VIEW__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__GOVERNS = PAPYRUS_VIEW__GOVERNS;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__VIEWPOINT = PAPYRUS_VIEW__VIEWPOINT;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__ICON = PAPYRUS_VIEW__ICON;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__PARENT = PAPYRUS_VIEW__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Profiles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__PROFILES = PAPYRUS_VIEW__PROFILES;
+
+ /**
+ * The feature id for the '<em><b>Model Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__MODEL_RULES = PAPYRUS_VIEW__MODEL_RULES;
+
+ /**
+ * The feature id for the '<em><b>Owning Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__OWNING_RULES = PAPYRUS_VIEW__OWNING_RULES;
+
+ /**
+ * The feature id for the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__IMPLEMENTATION_ID = PAPYRUS_VIEW__IMPLEMENTATION_ID;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CATEGORIES = PAPYRUS_VIEW__CATEGORIES;
+
+ /**
+ * The feature id for the '<em><b>Custom Palette</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CUSTOM_PALETTE = PAPYRUS_VIEW_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Custom Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CUSTOM_STYLE = PAPYRUS_VIEW_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Child Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__CHILD_RULES = PAPYRUS_VIEW_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Palette Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__PALETTE_RULES = PAPYRUS_VIEW_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Imports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__IMPORTS = PAPYRUS_VIEW_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Diagram</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 5;
+
+ /**
+ * The number of operations of the '<em>Papyrus Diagram</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM_OPERATION_COUNT = PAPYRUS_VIEW_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusSyncTableImpl <em>Papyrus Sync Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusSyncTableImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusSyncTable()
+ * @generated
+ */
+ int PAPYRUS_SYNC_TABLE = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__NAME = PAPYRUS_VIEW__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__AFFECTED_BY = PAPYRUS_VIEW__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__GOVERNS = PAPYRUS_VIEW__GOVERNS;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__VIEWPOINT = PAPYRUS_VIEW__VIEWPOINT;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__ICON = PAPYRUS_VIEW__ICON;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__PARENT = PAPYRUS_VIEW__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Profiles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__PROFILES = PAPYRUS_VIEW__PROFILES;
+
+ /**
+ * The feature id for the '<em><b>Model Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__MODEL_RULES = PAPYRUS_VIEW__MODEL_RULES;
+
+ /**
+ * The feature id for the '<em><b>Owning Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__OWNING_RULES = PAPYRUS_VIEW__OWNING_RULES;
+
+ /**
+ * The feature id for the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__IMPLEMENTATION_ID = PAPYRUS_VIEW__IMPLEMENTATION_ID;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE__CATEGORIES = PAPYRUS_VIEW__CATEGORIES;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Sync Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Papyrus Sync Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_SYNC_TABLE_OPERATION_COUNT = PAPYRUS_VIEW_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusTable()
+ * @generated
+ */
+ int PAPYRUS_TABLE = 5;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__NAME = PAPYRUS_VIEW__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__AFFECTED_BY = PAPYRUS_VIEW__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__GOVERNS = PAPYRUS_VIEW__GOVERNS;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__VIEWPOINT = PAPYRUS_VIEW__VIEWPOINT;
+
+ /**
+ * The feature id for the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__ICON = PAPYRUS_VIEW__ICON;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__PARENT = PAPYRUS_VIEW__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Profiles</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__PROFILES = PAPYRUS_VIEW__PROFILES;
+
+ /**
+ * The feature id for the '<em><b>Model Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__MODEL_RULES = PAPYRUS_VIEW__MODEL_RULES;
+
+ /**
+ * The feature id for the '<em><b>Owning Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__OWNING_RULES = PAPYRUS_VIEW__OWNING_RULES;
+
+ /**
+ * The feature id for the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__IMPLEMENTATION_ID = PAPYRUS_VIEW__IMPLEMENTATION_ID;
+
+ /**
+ * The feature id for the '<em><b>Categories</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__CATEGORIES = PAPYRUS_VIEW__CATEGORIES;
+
+ /**
+ * The feature id for the '<em><b>Configuration</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE__CONFIGURATION = PAPYRUS_VIEW_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Papyrus Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Papyrus Table</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_TABLE_OPERATION_COUNT = PAPYRUS_VIEW_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.RuleImpl <em>Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.RuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getRule()
+ * @generated
+ */
+ int RULE = 6;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RULE__PERMIT = 0;
+
+ /**
+ * The number of structural features of the '<em>Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RULE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RULE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl <em>Model Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getModelRule()
+ * @generated
+ */
+ int MODEL_RULE = 7;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE__PERMIT = RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE__ELEMENT = RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Stereotypes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE__STEREOTYPES = RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Multiplicity</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE__MULTIPLICITY = RULE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Auto Select Path</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE__AUTO_SELECT_PATH = RULE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Model Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Model Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_RULE_OPERATION_COUNT = RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl <em>Owning Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getOwningRule()
+ * @generated
+ */
+ int OWNING_RULE = 8;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE__PERMIT = RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE__ELEMENT = RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Stereotypes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE__STEREOTYPES = RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Multiplicity</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE__MULTIPLICITY = RULE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Owning Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Owning Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE_OPERATION_COUNT = RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl <em>Child Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getChildRule()
+ * @generated
+ */
+ int CHILD_RULE = 9;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__PERMIT = RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__ELEMENT = RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Stereotypes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__STEREOTYPES = RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__ORIGIN = RULE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Insertion Path</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE__INSERTION_PATH = RULE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Child Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Child Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_RULE_OPERATION_COUNT = RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PaletteRuleImpl <em>Palette Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PaletteRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPaletteRule()
+ * @generated
+ */
+ int PALETTE_RULE = 10;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE__PERMIT = RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE__ELEMENT = RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Palette Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Palette Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PALETTE_RULE_OPERATION_COUNT = RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl <em>Path Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPathElement()
+ * @generated
+ */
+ int PATH_ELEMENT = 11;
+
+ /**
+ * The feature id for the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__FEATURE = 0;
+
+ /**
+ * The feature id for the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__ORIGIN = 1;
+
+ /**
+ * The feature id for the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT__TARGET = 2;
+
+ /**
+ * The number of structural features of the '<em>Path Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>Path Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATH_ELEMENT_OPERATION_COUNT = 0;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.CategoryImpl <em>Category</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.CategoryImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getCategory()
+ * @generated
+ */
+ int CATEGORY = 12;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Category</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Category</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CATEGORY_OPERATION_COUNT = 0;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl <em>Element Import</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementImport()
+ * @generated
+ */
+ int ELEMENT_IMPORT = 13;
+
+ /**
+ * The feature id for the '<em><b>From</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_IMPORT__FROM = 0;
+
+ /**
+ * The feature id for the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_IMPORT__ELEMENT = 1;
+
+ /**
+ * The number of structural features of the '<em>Element Import</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_IMPORT_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Element Import</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_IMPORT_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration <em>Papyrus Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration
+ * @generated
+ */
+ EClass getPapyrusConfiguration();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getDefaultStakeholder <em>Default Stakeholder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Default Stakeholder</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getDefaultStakeholder()
+ * @see #getPapyrusConfiguration()
+ * @generated
+ */
+ EReference getPapyrusConfiguration_DefaultStakeholder();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getMetamodel <em>Metamodel</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Metamodel</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getMetamodel()
+ * @see #getPapyrusConfiguration()
+ * @generated
+ */
+ EReference getPapyrusConfiguration_Metamodel();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getCategories <em>Categories</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Categories</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getCategories()
+ * @see #getPapyrusConfiguration()
+ * @generated
+ */
+ EReference getPapyrusConfiguration_Categories();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint <em>Papyrus Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Viewpoint</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint
+ * @generated
+ */
+ EClass getPapyrusViewpoint();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Parent</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint#getParent()
+ * @see #getPapyrusViewpoint()
+ * @generated
+ */
+ EReference getPapyrusViewpoint_Parent();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView <em>Papyrus View</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus View</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView
+ * @generated
+ */
+ EClass getPapyrusView();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getIcon <em>Icon</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Icon</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getIcon()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EAttribute getPapyrusView_Icon();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Parent</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getParent()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EReference getPapyrusView_Parent();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getProfiles <em>Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Profiles</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getProfiles()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EReference getPapyrusView_Profiles();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getModelRules <em>Model Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Model Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getModelRules()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EReference getPapyrusView_ModelRules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getOwningRules <em>Owning Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Owning Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getOwningRules()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EReference getPapyrusView_OwningRules();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getImplementationID <em>Implementation ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Implementation ID</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getImplementationID()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EAttribute getPapyrusView_ImplementationID();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getCategories <em>Categories</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Categories</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getCategories()
+ * @see #getPapyrusView()
+ * @generated
+ */
+ EReference getPapyrusView_Categories();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram <em>Papyrus Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Diagram</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram
+ * @generated
+ */
+ EClass getPapyrusDiagram();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Custom Palette</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomPalette()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EAttribute getPapyrusDiagram_CustomPalette();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Custom Style</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomStyle()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EAttribute getPapyrusDiagram_CustomStyle();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getChildRules <em>Child Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Child Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getChildRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_ChildRules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Palette Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getPaletteRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_PaletteRules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports <em>Imports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Imports</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_Imports();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable <em>Papyrus Sync Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Sync Table</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable
+ * @generated
+ */
+ EClass getPapyrusSyncTable();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable <em>Papyrus Table</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus Table</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable
+ * @generated
+ */
+ EClass getPapyrusTable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable#getConfiguration <em>Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable#getConfiguration()
+ * @see #getPapyrusTable()
+ * @generated
+ */
+ EAttribute getPapyrusTable_Configuration();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule <em>Model Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule
+ * @generated
+ */
+ EClass getModelRule();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getElement()
+ * @see #getModelRule()
+ * @generated
+ */
+ EReference getModelRule_Element();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getStereotypes <em>Stereotypes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stereotypes</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getStereotypes()
+ * @see #getModelRule()
+ * @generated
+ */
+ EReference getModelRule_Stereotypes();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getMultiplicity <em>Multiplicity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Multiplicity</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getMultiplicity()
+ * @see #getModelRule()
+ * @generated
+ */
+ EAttribute getModelRule_Multiplicity();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath <em>Auto Select Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Auto Select Path</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath()
+ * @see #getModelRule()
+ * @generated
+ */
+ EReference getModelRule_AutoSelectPath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule <em>Owning Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Owning Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule
+ * @generated
+ */
+ EClass getOwningRule();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getElement()
+ * @see #getOwningRule()
+ * @generated
+ */
+ EReference getOwningRule_Element();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getStereotypes <em>Stereotypes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stereotypes</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getStereotypes()
+ * @see #getOwningRule()
+ * @generated
+ */
+ EReference getOwningRule_Stereotypes();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getMultiplicity <em>Multiplicity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Multiplicity</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getMultiplicity()
+ * @see #getOwningRule()
+ * @generated
+ */
+ EAttribute getOwningRule_Multiplicity();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule <em>Child Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Child Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule
+ * @generated
+ */
+ EClass getChildRule();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getElement()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Element();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getStereotypes <em>Stereotypes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stereotypes</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getStereotypes()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Stereotypes();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getOrigin <em>Origin</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Origin</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getOrigin()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_Origin();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getInsertionPath <em>Insertion Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Insertion Path</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule#getInsertionPath()
+ * @see #getChildRule()
+ * @generated
+ */
+ EReference getChildRule_InsertionPath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule <em>Palette Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Palette Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule
+ * @generated
+ */
+ EClass getPaletteRule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule#getElement()
+ * @see #getPaletteRule()
+ * @generated
+ */
+ EAttribute getPaletteRule_Element();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule <em>Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Rule
+ * @generated
+ */
+ EClass getRule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule#isPermit <em>Permit</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Permit</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Rule#isPermit()
+ * @see #getRule()
+ * @generated
+ */
+ EAttribute getRule_Permit();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement <em>Path Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Path Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PathElement
+ * @generated
+ */
+ EClass getPathElement();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getFeature <em>Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Feature</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getFeature()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Feature();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getOrigin <em>Origin</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Origin</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getOrigin()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Origin();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getTarget <em>Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Target</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getTarget()
+ * @see #getPathElement()
+ * @generated
+ */
+ EReference getPathElement_Target();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Category <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Category</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Category
+ * @generated
+ */
+ EClass getCategory();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Category#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Category#getName()
+ * @see #getCategory()
+ * @generated
+ */
+ EAttribute getCategory_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport <em>Element Import</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Element Import</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport
+ * @generated
+ */
+ EClass getElementImport();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>From</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom()
+ * @see #getElementImport()
+ * @generated
+ */
+ EReference getElementImport_From();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement()
+ * @see #getElementImport()
+ * @generated
+ */
+ EReference getElementImport_Element();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ConfigurationFactory getConfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl <em>Papyrus Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusConfiguration()
+ * @generated
+ */
+ EClass PAPYRUS_CONFIGURATION = eINSTANCE.getPapyrusConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Default Stakeholder</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER = eINSTANCE.getPapyrusConfiguration_DefaultStakeholder();
+
+ /**
+ * The meta object literal for the '<em><b>Metamodel</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_CONFIGURATION__METAMODEL = eINSTANCE.getPapyrusConfiguration_Metamodel();
+
+ /**
+ * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_CONFIGURATION__CATEGORIES = eINSTANCE.getPapyrusConfiguration_Categories();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewpointImpl <em>Papyrus Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewpointImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusViewpoint()
+ * @generated
+ */
+ EClass PAPYRUS_VIEWPOINT = eINSTANCE.getPapyrusViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEWPOINT__PARENT = eINSTANCE.getPapyrusViewpoint_Parent();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl <em>Papyrus View</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusView()
+ * @generated
+ */
+ EClass PAPYRUS_VIEW = eINSTANCE.getPapyrusView();
+
+ /**
+ * The meta object literal for the '<em><b>Icon</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_VIEW__ICON = eINSTANCE.getPapyrusView_Icon();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW__PARENT = eINSTANCE.getPapyrusView_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Profiles</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW__PROFILES = eINSTANCE.getPapyrusView_Profiles();
+
+ /**
+ * The meta object literal for the '<em><b>Model Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW__MODEL_RULES = eINSTANCE.getPapyrusView_ModelRules();
+
+ /**
+ * The meta object literal for the '<em><b>Owning Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW__OWNING_RULES = eINSTANCE.getPapyrusView_OwningRules();
+
+ /**
+ * The meta object literal for the '<em><b>Implementation ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_VIEW__IMPLEMENTATION_ID = eINSTANCE.getPapyrusView_ImplementationID();
+
+ /**
+ * The meta object literal for the '<em><b>Categories</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW__CATEGORIES = eINSTANCE.getPapyrusView_Categories();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl <em>Papyrus Diagram</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusDiagram()
+ * @generated
+ */
+ EClass PAPYRUS_DIAGRAM = eINSTANCE.getPapyrusDiagram();
+
+ /**
+ * The meta object literal for the '<em><b>Custom Palette</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_DIAGRAM__CUSTOM_PALETTE = eINSTANCE.getPapyrusDiagram_CustomPalette();
+
+ /**
+ * The meta object literal for the '<em><b>Custom Style</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_DIAGRAM__CUSTOM_STYLE = eINSTANCE.getPapyrusDiagram_CustomStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Child Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__CHILD_RULES = eINSTANCE.getPapyrusDiagram_ChildRules();
+
+ /**
+ * The meta object literal for the '<em><b>Palette Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__PALETTE_RULES = eINSTANCE.getPapyrusDiagram_PaletteRules();
+
+ /**
+ * The meta object literal for the '<em><b>Imports</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__IMPORTS = eINSTANCE.getPapyrusDiagram_Imports();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusSyncTableImpl <em>Papyrus Sync Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusSyncTableImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusSyncTable()
+ * @generated
+ */
+ EClass PAPYRUS_SYNC_TABLE = eINSTANCE.getPapyrusSyncTable();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusTableImpl <em>Papyrus Table</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusTableImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPapyrusTable()
+ * @generated
+ */
+ EClass PAPYRUS_TABLE = eINSTANCE.getPapyrusTable();
+
+ /**
+ * The meta object literal for the '<em><b>Configuration</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PAPYRUS_TABLE__CONFIGURATION = eINSTANCE.getPapyrusTable_Configuration();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl <em>Model Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getModelRule()
+ * @generated
+ */
+ EClass MODEL_RULE = eINSTANCE.getModelRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_RULE__ELEMENT = eINSTANCE.getModelRule_Element();
+
+ /**
+ * The meta object literal for the '<em><b>Stereotypes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_RULE__STEREOTYPES = eINSTANCE.getModelRule_Stereotypes();
+
+ /**
+ * The meta object literal for the '<em><b>Multiplicity</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MODEL_RULE__MULTIPLICITY = eINSTANCE.getModelRule_Multiplicity();
+
+ /**
+ * The meta object literal for the '<em><b>Auto Select Path</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_RULE__AUTO_SELECT_PATH = eINSTANCE.getModelRule_AutoSelectPath();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl <em>Owning Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getOwningRule()
+ * @generated
+ */
+ EClass OWNING_RULE = eINSTANCE.getOwningRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference OWNING_RULE__ELEMENT = eINSTANCE.getOwningRule_Element();
+
+ /**
+ * The meta object literal for the '<em><b>Stereotypes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference OWNING_RULE__STEREOTYPES = eINSTANCE.getOwningRule_Stereotypes();
+
+ /**
+ * The meta object literal for the '<em><b>Multiplicity</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute OWNING_RULE__MULTIPLICITY = eINSTANCE.getOwningRule_Multiplicity();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl <em>Child Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getChildRule()
+ * @generated
+ */
+ EClass CHILD_RULE = eINSTANCE.getChildRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__ELEMENT = eINSTANCE.getChildRule_Element();
+
+ /**
+ * The meta object literal for the '<em><b>Stereotypes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__STEREOTYPES = eINSTANCE.getChildRule_Stereotypes();
+
+ /**
+ * The meta object literal for the '<em><b>Origin</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__ORIGIN = eINSTANCE.getChildRule_Origin();
+
+ /**
+ * The meta object literal for the '<em><b>Insertion Path</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CHILD_RULE__INSERTION_PATH = eINSTANCE.getChildRule_InsertionPath();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PaletteRuleImpl <em>Palette Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PaletteRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPaletteRule()
+ * @generated
+ */
+ EClass PALETTE_RULE = eINSTANCE.getPaletteRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PALETTE_RULE__ELEMENT = eINSTANCE.getPaletteRule_Element();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.RuleImpl <em>Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.RuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getRule()
+ * @generated
+ */
+ EClass RULE = eINSTANCE.getRule();
+
+ /**
+ * The meta object literal for the '<em><b>Permit</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute RULE__PERMIT = eINSTANCE.getRule_Permit();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl <em>Path Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getPathElement()
+ * @generated
+ */
+ EClass PATH_ELEMENT = eINSTANCE.getPathElement();
+
+ /**
+ * The meta object literal for the '<em><b>Feature</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__FEATURE = eINSTANCE.getPathElement_Feature();
+
+ /**
+ * The meta object literal for the '<em><b>Origin</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__ORIGIN = eINSTANCE.getPathElement_Origin();
+
+ /**
+ * The meta object literal for the '<em><b>Target</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PATH_ELEMENT__TARGET = eINSTANCE.getPathElement_Target();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.CategoryImpl <em>Category</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.CategoryImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getCategory()
+ * @generated
+ */
+ EClass CATEGORY = eINSTANCE.getCategory();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CATEGORY__NAME = eINSTANCE.getCategory_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl <em>Element Import</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementImport()
+ * @generated
+ */
+ EClass ELEMENT_IMPORT = eINSTANCE.getElementImport();
+
+ /**
+ * The meta object literal for the '<em><b>From</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ELEMENT_IMPORT__FROM = eINSTANCE.getElementImport_From();
+
+ /**
+ * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ELEMENT_IMPORT__ELEMENT = eINSTANCE.getElementImport_Element();
+
+ }
+
+} //ConfigurationPackage
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java
new file mode 100755
index 00000000000..f4a7feb3f20
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java
@@ -0,0 +1,89 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element Import</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport()
+ * @model
+ * @generated
+ */
+public interface ElementImport extends EObject {
+ /**
+ * Returns the value of the '<em><b>From</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>From</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>From</em>' reference.
+ * @see #setFrom(PapyrusDiagram)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport_From()
+ * @model required="true"
+ * @generated
+ */
+ PapyrusDiagram getFrom();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>From</em>' reference.
+ * @see #getFrom()
+ * @generated
+ */
+ void setFrom(PapyrusDiagram value);
+
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport_Element()
+ * @model required="true"
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EClass value);
+
+} // ElementImport
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java
new file mode 100755
index 00000000000..e4e1607b709
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java
@@ -0,0 +1,124 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getMultiplicity <em>Multiplicity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath <em>Auto Select Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule()
+ * @model
+ * @generated
+ */
+public interface ModelRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule_Element()
+ * @model
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getElement <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Stereotypes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stereotypes</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stereotypes</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule_Stereotypes()
+ * @model
+ * @generated
+ */
+ EList<EClass> getStereotypes();
+
+ /**
+ * Returns the value of the '<em><b>Multiplicity</b></em>' attribute.
+ * The default value is <code>"-1"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Multiplicity</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Multiplicity</em>' attribute.
+ * @see #setMultiplicity(int)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule_Multiplicity()
+ * @model default="-1" required="true"
+ * @generated
+ */
+ int getMultiplicity();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getMultiplicity <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Multiplicity</em>' attribute.
+ * @see #getMultiplicity()
+ * @generated
+ */
+ void setMultiplicity(int value);
+
+ /**
+ * Returns the value of the '<em><b>Auto Select Path</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Auto Select Path</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Auto Select Path</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule_AutoSelectPath()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PathElement> getAutoSelectPath();
+
+} // ModelRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java
new file mode 100755
index 00000000000..ae4140cbdbf
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java
@@ -0,0 +1,107 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Owning Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getMultiplicity <em>Multiplicity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getOwningRule()
+ * @model
+ * @generated
+ */
+public interface OwningRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' reference.
+ * @see #setElement(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getOwningRule_Element()
+ * @model
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getElement <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' reference.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(EClass value);
+
+ /**
+ * Returns the value of the '<em><b>Stereotypes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stereotypes</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stereotypes</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getOwningRule_Stereotypes()
+ * @model
+ * @generated
+ */
+ EList<EClass> getStereotypes();
+
+ /**
+ * Returns the value of the '<em><b>Multiplicity</b></em>' attribute.
+ * The default value is <code>"-1"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Multiplicity</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Multiplicity</em>' attribute.
+ * @see #setMultiplicity(int)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getOwningRule_Multiplicity()
+ * @model default="-1" required="true"
+ * @generated
+ */
+ int getMultiplicity();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getMultiplicity <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Multiplicity</em>' attribute.
+ * @see #getMultiplicity()
+ * @generated
+ */
+ void setMultiplicity(int value);
+
+} // OwningRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PaletteRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PaletteRule.java
new file mode 100755
index 00000000000..278c3cd5c95
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PaletteRule.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Palette Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule#getElement <em>Element</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPaletteRule()
+ * @model
+ * @generated
+ */
+public interface PaletteRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Element</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Element</em>' attribute.
+ * @see #setElement(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPaletteRule_Element()
+ * @model
+ * @generated
+ */
+ String getElement();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule#getElement <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element</em>' attribute.
+ * @see #getElement()
+ * @generated
+ */
+ void setElement(String value);
+
+} // PaletteRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusConfiguration.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusConfiguration.java
new file mode 100755
index 00000000000..774115ca1d3
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusConfiguration.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getDefaultStakeholder <em>Default Stakeholder</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getMetamodel <em>Metamodel</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getCategories <em>Categories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusConfiguration()
+ * @model
+ * @generated
+ */
+public interface PapyrusConfiguration extends ArchitectureFramework {
+ /**
+ * Returns the value of the '<em><b>Default Stakeholder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Default Stakeholder</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Default Stakeholder</em>' reference.
+ * @see #setDefaultStakeholder(Stakeholder)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusConfiguration_DefaultStakeholder()
+ * @model required="true"
+ * @generated
+ */
+ Stakeholder getDefaultStakeholder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getDefaultStakeholder <em>Default Stakeholder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Default Stakeholder</em>' reference.
+ * @see #getDefaultStakeholder()
+ * @generated
+ */
+ void setDefaultStakeholder(Stakeholder value);
+
+ /**
+ * Returns the value of the '<em><b>Metamodel</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Metamodel</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Metamodel</em>' reference.
+ * @see #setMetamodel(EPackage)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusConfiguration_Metamodel()
+ * @model required="true"
+ * @generated
+ */
+ EPackage getMetamodel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration#getMetamodel <em>Metamodel</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Metamodel</em>' reference.
+ * @see #getMetamodel()
+ * @generated
+ */
+ void setMetamodel(EPackage value);
+
+ /**
+ * Returns the value of the '<em><b>Categories</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.Category}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Categories</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Categories</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusConfiguration_Categories()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Category> getCategories();
+
+} // PapyrusConfiguration
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
new file mode 100755
index 00000000000..7f01343501b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Diagram</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getChildRules <em>Child Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports <em>Imports</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram()
+ * @model
+ * @generated
+ */
+public interface PapyrusDiagram extends PapyrusView {
+ /**
+ * Returns the value of the '<em><b>Custom Palette</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Palette</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Palette</em>' attribute.
+ * @see #setCustomPalette(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_CustomPalette()
+ * @model
+ * @generated
+ */
+ String getCustomPalette();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomPalette <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Palette</em>' attribute.
+ * @see #getCustomPalette()
+ * @generated
+ */
+ void setCustomPalette(String value);
+
+ /**
+ * Returns the value of the '<em><b>Custom Style</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Custom Style</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Custom Style</em>' attribute.
+ * @see #setCustomStyle(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_CustomStyle()
+ * @model
+ * @generated
+ */
+ String getCustomStyle();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Custom Style</em>' attribute.
+ * @see #getCustomStyle()
+ * @generated
+ */
+ void setCustomStyle(String value);
+
+ /**
+ * Returns the value of the '<em><b>Child Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which model elements can be added as child of the origin through this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Child Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_ChildRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ChildRule> getChildRules();
+
+ /**
+ * Returns the value of the '<em><b>Palette Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which palette elements should be available for this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Palette Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_PaletteRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PaletteRule> getPaletteRules();
+
+ /**
+ * Returns the value of the '<em><b>Imports</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Imports</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Imports</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_Imports()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ElementImport> getImports();
+
+} // PapyrusDiagram
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusSyncTable.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusSyncTable.java
new file mode 100755
index 00000000000..d799cb60aec
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusSyncTable.java
@@ -0,0 +1,28 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Sync Table</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusSyncTable()
+ * @model
+ * @generated
+ */
+public interface PapyrusSyncTable extends PapyrusView {
+} // PapyrusSyncTable
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusTable.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusTable.java
new file mode 100755
index 00000000000..13b8722f09d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusTable.java
@@ -0,0 +1,60 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable#getConfiguration <em>Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusTable()
+ * @model
+ * @generated
+ */
+public interface PapyrusTable extends PapyrusView {
+ /**
+ * Returns the value of the '<em><b>Configuration</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Configuration</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Configuration</em>' attribute.
+ * @see #setConfiguration(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusTable_Configuration()
+ * @model required="true"
+ * @generated
+ */
+ String getConfiguration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable#getConfiguration <em>Configuration</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Configuration</em>' attribute.
+ * @see #getConfiguration()
+ * @generated
+ */
+ void setConfiguration(String value);
+
+} // PapyrusTable
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusView.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusView.java
new file mode 100755
index 00000000000..ee7904d05dc
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusView.java
@@ -0,0 +1,183 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus View</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getProfiles <em>Profiles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getModelRules <em>Model Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getOwningRules <em>Owning Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getImplementationID <em>Implementation ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getCategories <em>Categories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView()
+ * @model
+ * @generated
+ */
+public interface PapyrusView extends ModelKind {
+
+ /**
+ * Returns the value of the '<em><b>Icon</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Icon</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Icon</em>' attribute.
+ * @see #setIcon(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_Icon()
+ * @model
+ * @generated
+ */
+ String getIcon();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getIcon <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Icon</em>' attribute.
+ * @see #getIcon()
+ * @generated
+ */
+ void setIcon(String value);
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent</em>' reference.
+ * @see #setParent(PapyrusView)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_Parent()
+ * @model
+ * @generated
+ */
+ PapyrusView getParent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getParent <em>Parent</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent</em>' reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(PapyrusView value);
+
+ /**
+ * Returns the value of the '<em><b>Profiles</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.EPackage}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Profiles</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Profiles</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_Profiles()
+ * @model
+ * @generated
+ */
+ EList<EPackage> getProfiles();
+
+ /**
+ * Returns the value of the '<em><b>Model Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which model elements can be the semantic element behind this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Model Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_ModelRules()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<ModelRule> getModelRules();
+
+ /**
+ * Returns the value of the '<em><b>Owning Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which elements can be the syntactic owner of this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Owning Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_OwningRules()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<OwningRule> getOwningRules();
+
+ /**
+ * Returns the value of the '<em><b>Implementation ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Implementation ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Implementation ID</em>' attribute.
+ * @see #setImplementationID(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_ImplementationID()
+ * @model required="true"
+ * @generated
+ */
+ String getImplementationID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView#getImplementationID <em>Implementation ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Implementation ID</em>' attribute.
+ * @see #getImplementationID()
+ * @generated
+ */
+ void setImplementationID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Categories</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.Category}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Categories</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Categories</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusView_Categories()
+ * @model
+ * @generated
+ */
+ EList<Category> getCategories();
+} // PapyrusView
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusViewpoint.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusViewpoint.java
new file mode 100755
index 00000000000..5a55ec4d6fe
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusViewpoint.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusViewpoint()
+ * @model
+ * @generated
+ */
+public interface PapyrusViewpoint extends ArchitectureViewpoint {
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent</em>' reference.
+ * @see #setParent(PapyrusViewpoint)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusViewpoint_Parent()
+ * @model
+ * @generated
+ */
+ PapyrusViewpoint getParent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint#getParent <em>Parent</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent</em>' reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(PapyrusViewpoint value);
+
+} // PapyrusViewpoint
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PathElement.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PathElement.java
new file mode 100755
index 00000000000..39e28ac30ba
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PathElement.java
@@ -0,0 +1,95 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Path Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getTarget <em>Target</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPathElement()
+ * @model
+ * @generated
+ */
+public interface PathElement extends EObject {
+ /**
+ * Returns the value of the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Feature</em>' reference.
+ * @see #setFeature(EReference)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPathElement_Feature()
+ * @model required="true"
+ * @generated
+ */
+ EReference getFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement#getFeature <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Feature</em>' reference.
+ * @see #getFeature()
+ * @generated
+ */
+ void setFeature(EReference value);
+
+ /**
+ * Returns the value of the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Origin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Origin</em>' reference.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPathElement_Origin()
+ * @model required="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EClass getOrigin();
+
+ /**
+ * Returns the value of the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target</em>' reference.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPathElement_Target()
+ * @model required="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EClass getTarget();
+
+} // PathElement
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Rule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Rule.java
new file mode 100755
index 00000000000..a276a04557a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Rule.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule#isPermit <em>Permit</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getRule()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Rule extends EObject {
+ /**
+ * Returns the value of the '<em><b>Permit</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Permit</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Permit</em>' attribute.
+ * @see #setPermit(boolean)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getRule_Permit()
+ * @model default="true" required="true"
+ * @generated
+ */
+ boolean isPermit();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule#isPermit <em>Permit</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Permit</em>' attribute.
+ * @see #isPermit()
+ * @generated
+ */
+ void setPermit(boolean value);
+
+} // Rule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java
new file mode 100755
index 00000000000..d0d03140389
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java
@@ -0,0 +1,174 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Category</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.CategoryImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CategoryImpl extends MinimalEObjectImpl.Container implements Category {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CategoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.CATEGORY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CATEGORY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.CATEGORY__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.CATEGORY__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.CATEGORY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.CATEGORY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CategoryImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java
new file mode 100755
index 00000000000..4db7fc0d8e9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java
@@ -0,0 +1,319 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Child Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl#getInsertionPath <em>Insertion Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ChildRuleImpl extends RuleImpl implements ChildRule {
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected EClass element;
+
+ /**
+ * The cached value of the '{@link #getStereotypes() <em>Stereotypes</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<EClass> stereotypes;
+
+ /**
+ * The cached value of the '{@link #getOrigin() <em>Origin</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrigin()
+ * @generated
+ * @ordered
+ */
+ protected EClass origin;
+
+ /**
+ * The cached value of the '{@link #getInsertionPath() <em>Insertion Path</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInsertionPath()
+ * @generated
+ * @ordered
+ */
+ protected EList<PathElement> insertionPath;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.CHILD_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ if (element != null && element.eIsProxy()) {
+ InternalEObject oldElement = (InternalEObject)element;
+ element = (EClass)eResolveProxy(oldElement);
+ if (element != oldElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
+ }
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(EClass newElement) {
+ EClass oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EClass> getStereotypes() {
+ if (stereotypes == null) {
+ stereotypes = new EObjectResolvingEList<EClass>(EClass.class, this, ConfigurationPackage.CHILD_RULE__STEREOTYPES);
+ }
+ return stereotypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrigin() {
+ if (origin != null && origin.eIsProxy()) {
+ InternalEObject oldOrigin = (InternalEObject)origin;
+ origin = (EClass)eResolveProxy(oldOrigin);
+ if (origin != oldOrigin) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
+ }
+ return origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetOrigin() {
+ return origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrigin(EClass newOrigin) {
+ EClass oldOrigin = origin;
+ origin = newOrigin;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PathElement> getInsertionPath() {
+ if (insertionPath == null) {
+ insertionPath = new EObjectContainmentEList<PathElement>(PathElement.class, this, ConfigurationPackage.CHILD_RULE__INSERTION_PATH);
+ }
+ return insertionPath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return ((InternalEList<?>)getInsertionPath()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ if (resolve) return getElement();
+ return basicGetElement();
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ if (resolve) return getOrigin();
+ return basicGetOrigin();
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return getInsertionPath();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass)newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>)newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass)newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ getInsertionPath().addAll((Collection<? extends PathElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass)null);
+ return;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass)null);
+ return;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ return origin != null;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return insertionPath != null && !insertionPath.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ChildRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
new file mode 100755
index 00000000000..7176aacd15f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
@@ -0,0 +1,238 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationFactoryImpl extends EFactoryImpl implements ConfigurationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ConfigurationFactory init() {
+ try {
+ ConfigurationFactory theConfigurationFactory = (ConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(ConfigurationPackage.eNS_URI);
+ if (theConfigurationFactory != null) {
+ return theConfigurationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ConfigurationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION: return createPapyrusConfiguration();
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT: return createPapyrusViewpoint();
+ case ConfigurationPackage.PAPYRUS_VIEW: return createPapyrusView();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM: return createPapyrusDiagram();
+ case ConfigurationPackage.PAPYRUS_SYNC_TABLE: return createPapyrusSyncTable();
+ case ConfigurationPackage.PAPYRUS_TABLE: return createPapyrusTable();
+ case ConfigurationPackage.MODEL_RULE: return createModelRule();
+ case ConfigurationPackage.OWNING_RULE: return createOwningRule();
+ case ConfigurationPackage.CHILD_RULE: return createChildRule();
+ case ConfigurationPackage.PALETTE_RULE: return createPaletteRule();
+ case ConfigurationPackage.PATH_ELEMENT: return createPathElement();
+ case ConfigurationPackage.CATEGORY: return createCategory();
+ case ConfigurationPackage.ELEMENT_IMPORT: return createElementImport();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusConfiguration createPapyrusConfiguration() {
+ PapyrusConfigurationImpl papyrusConfiguration = new PapyrusConfigurationImpl();
+ return papyrusConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewpoint createPapyrusViewpoint() {
+ PapyrusViewpointImpl papyrusViewpoint = new PapyrusViewpointImpl();
+ return papyrusViewpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusView createPapyrusView() {
+ PapyrusViewImpl papyrusView = new PapyrusViewImpl();
+ return papyrusView;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram createPapyrusDiagram() {
+ PapyrusDiagramImpl papyrusDiagram = new PapyrusDiagramImpl();
+ return papyrusDiagram;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusSyncTable createPapyrusSyncTable() {
+ PapyrusSyncTableImpl papyrusSyncTable = new PapyrusSyncTableImpl();
+ return papyrusSyncTable;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusTable createPapyrusTable() {
+ PapyrusTableImpl papyrusTable = new PapyrusTableImpl();
+ return papyrusTable;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelRule createModelRule() {
+ ModelRuleImpl modelRule = new ModelRuleImpl();
+ return modelRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OwningRule createOwningRule() {
+ OwningRuleImpl owningRule = new OwningRuleImpl();
+ return owningRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ChildRule createChildRule() {
+ ChildRuleImpl childRule = new ChildRuleImpl();
+ return childRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteRule createPaletteRule() {
+ PaletteRuleImpl paletteRule = new PaletteRuleImpl();
+ return paletteRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PathElement createPathElement() {
+ PathElementImpl pathElement = new PathElementImpl();
+ return pathElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Category createCategory() {
+ CategoryImpl category = new CategoryImpl();
+ return category;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ElementImport createElementImport() {
+ ElementImportImpl elementImport = new ElementImportImpl();
+ return elementImport;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationPackage getConfigurationPackage() {
+ return (ConfigurationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ConfigurationPackage getPackage() {
+ return ConfigurationPackage.eINSTANCE;
+ }
+
+} //ConfigurationFactoryImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
new file mode 100755
index 00000000000..74e443c3040
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
@@ -0,0 +1,864 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Rule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConfigurationPackageImpl extends EPackageImpl implements ConfigurationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusViewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusViewEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusDiagramEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusSyncTableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusTableEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass owningRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass childRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paletteRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass ruleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pathElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass categoryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass elementImportEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ConfigurationPackageImpl() {
+ super(eNS_URI, ConfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link ConfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ConfigurationPackage init() {
+ if (isInited) return (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ EcorePackage.eINSTANCE.eClass();
+ Iso42010Package.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theConfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theConfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theConfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ConfigurationPackage.eNS_URI, theConfigurationPackage);
+ return theConfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusConfiguration() {
+ return papyrusConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusConfiguration_DefaultStakeholder() {
+ return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusConfiguration_Metamodel() {
+ return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusConfiguration_Categories() {
+ return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusViewpoint() {
+ return papyrusViewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusViewpoint_Parent() {
+ return (EReference)papyrusViewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusView() {
+ return papyrusViewEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusView_Icon() {
+ return (EAttribute)papyrusViewEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusView_Parent() {
+ return (EReference)papyrusViewEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusView_Profiles() {
+ return (EReference)papyrusViewEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusView_ModelRules() {
+ return (EReference)papyrusViewEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusView_OwningRules() {
+ return (EReference)papyrusViewEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusView_ImplementationID() {
+ return (EAttribute)papyrusViewEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusView_Categories() {
+ return (EReference)papyrusViewEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusDiagram() {
+ return papyrusDiagramEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusDiagram_CustomPalette() {
+ return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusDiagram_CustomStyle() {
+ return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_ChildRules() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_PaletteRules() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_Imports() {
+ return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusSyncTable() {
+ return papyrusSyncTableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusTable() {
+ return papyrusTableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPapyrusTable_Configuration() {
+ return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModelRule() {
+ return modelRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelRule_Element() {
+ return (EReference)modelRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelRule_Stereotypes() {
+ return (EReference)modelRuleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getModelRule_Multiplicity() {
+ return (EAttribute)modelRuleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelRule_AutoSelectPath() {
+ return (EReference)modelRuleEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOwningRule() {
+ return owningRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOwningRule_Element() {
+ return (EReference)owningRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOwningRule_Stereotypes() {
+ return (EReference)owningRuleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getOwningRule_Multiplicity() {
+ return (EAttribute)owningRuleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getChildRule() {
+ return childRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Element() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Stereotypes() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_Origin() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getChildRule_InsertionPath() {
+ return (EReference)childRuleEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPaletteRule() {
+ return paletteRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPaletteRule_Element() {
+ return (EAttribute)paletteRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRule() {
+ return ruleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getRule_Permit() {
+ return (EAttribute)ruleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPathElement() {
+ return pathElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Feature() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Origin() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPathElement_Target() {
+ return (EReference)pathElementEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCategory() {
+ return categoryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCategory_Name() {
+ return (EAttribute)categoryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElementImport() {
+ return elementImportEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getElementImport_From() {
+ return (EReference)elementImportEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getElementImport_Element() {
+ return (EReference)elementImportEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationFactory getConfigurationFactory() {
+ return (ConfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusConfigurationEClass = createEClass(PAPYRUS_CONFIGURATION);
+ createEReference(papyrusConfigurationEClass, PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER);
+ createEReference(papyrusConfigurationEClass, PAPYRUS_CONFIGURATION__METAMODEL);
+ createEReference(papyrusConfigurationEClass, PAPYRUS_CONFIGURATION__CATEGORIES);
+
+ papyrusViewpointEClass = createEClass(PAPYRUS_VIEWPOINT);
+ createEReference(papyrusViewpointEClass, PAPYRUS_VIEWPOINT__PARENT);
+
+ papyrusViewEClass = createEClass(PAPYRUS_VIEW);
+ createEAttribute(papyrusViewEClass, PAPYRUS_VIEW__ICON);
+ createEReference(papyrusViewEClass, PAPYRUS_VIEW__PARENT);
+ createEReference(papyrusViewEClass, PAPYRUS_VIEW__PROFILES);
+ createEReference(papyrusViewEClass, PAPYRUS_VIEW__MODEL_RULES);
+ createEReference(papyrusViewEClass, PAPYRUS_VIEW__OWNING_RULES);
+ createEAttribute(papyrusViewEClass, PAPYRUS_VIEW__IMPLEMENTATION_ID);
+ createEReference(papyrusViewEClass, PAPYRUS_VIEW__CATEGORIES);
+
+ papyrusDiagramEClass = createEClass(PAPYRUS_DIAGRAM);
+ createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_PALETTE);
+ createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_STYLE);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CHILD_RULES);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__PALETTE_RULES);
+ createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__IMPORTS);
+
+ papyrusSyncTableEClass = createEClass(PAPYRUS_SYNC_TABLE);
+
+ papyrusTableEClass = createEClass(PAPYRUS_TABLE);
+ createEAttribute(papyrusTableEClass, PAPYRUS_TABLE__CONFIGURATION);
+
+ ruleEClass = createEClass(RULE);
+ createEAttribute(ruleEClass, RULE__PERMIT);
+
+ modelRuleEClass = createEClass(MODEL_RULE);
+ createEReference(modelRuleEClass, MODEL_RULE__ELEMENT);
+ createEReference(modelRuleEClass, MODEL_RULE__STEREOTYPES);
+ createEAttribute(modelRuleEClass, MODEL_RULE__MULTIPLICITY);
+ createEReference(modelRuleEClass, MODEL_RULE__AUTO_SELECT_PATH);
+
+ owningRuleEClass = createEClass(OWNING_RULE);
+ createEReference(owningRuleEClass, OWNING_RULE__ELEMENT);
+ createEReference(owningRuleEClass, OWNING_RULE__STEREOTYPES);
+ createEAttribute(owningRuleEClass, OWNING_RULE__MULTIPLICITY);
+
+ childRuleEClass = createEClass(CHILD_RULE);
+ createEReference(childRuleEClass, CHILD_RULE__ELEMENT);
+ createEReference(childRuleEClass, CHILD_RULE__STEREOTYPES);
+ createEReference(childRuleEClass, CHILD_RULE__ORIGIN);
+ createEReference(childRuleEClass, CHILD_RULE__INSERTION_PATH);
+
+ paletteRuleEClass = createEClass(PALETTE_RULE);
+ createEAttribute(paletteRuleEClass, PALETTE_RULE__ELEMENT);
+
+ pathElementEClass = createEClass(PATH_ELEMENT);
+ createEReference(pathElementEClass, PATH_ELEMENT__FEATURE);
+ createEReference(pathElementEClass, PATH_ELEMENT__ORIGIN);
+ createEReference(pathElementEClass, PATH_ELEMENT__TARGET);
+
+ categoryEClass = createEClass(CATEGORY);
+ createEAttribute(categoryEClass, CATEGORY__NAME);
+
+ elementImportEClass = createEClass(ELEMENT_IMPORT);
+ createEReference(elementImportEClass, ELEMENT_IMPORT__FROM);
+ createEReference(elementImportEClass, ELEMENT_IMPORT__ELEMENT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ Iso42010Package theIso42010Package = (Iso42010Package)EPackage.Registry.INSTANCE.getEPackage(Iso42010Package.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusConfigurationEClass.getESuperTypes().add(theIso42010Package.getArchitectureFramework());
+ papyrusViewpointEClass.getESuperTypes().add(theIso42010Package.getArchitectureViewpoint());
+ papyrusViewEClass.getESuperTypes().add(theIso42010Package.getModelKind());
+ papyrusDiagramEClass.getESuperTypes().add(this.getPapyrusView());
+ papyrusSyncTableEClass.getESuperTypes().add(this.getPapyrusView());
+ papyrusTableEClass.getESuperTypes().add(this.getPapyrusView());
+ modelRuleEClass.getESuperTypes().add(this.getRule());
+ owningRuleEClass.getESuperTypes().add(this.getRule());
+ childRuleEClass.getESuperTypes().add(this.getRule());
+ paletteRuleEClass.getESuperTypes().add(this.getRule());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(papyrusConfigurationEClass, PapyrusConfiguration.class, "PapyrusConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPapyrusConfiguration_DefaultStakeholder(), theIso42010Package.getStakeholder(), null, "defaultStakeholder", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusConfiguration_Metamodel(), ecorePackage.getEPackage(), null, "metamodel", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusConfiguration_Categories(), this.getCategory(), null, "categories", null, 0, -1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(papyrusViewpointEClass, PapyrusViewpoint.class, "PapyrusViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPapyrusViewpoint_Parent(), this.getPapyrusViewpoint(), null, "parent", null, 0, 1, PapyrusViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(papyrusViewEClass, PapyrusView.class, "PapyrusView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPapyrusView_Icon(), ecorePackage.getEString(), "icon", null, 0, 1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusView_Parent(), this.getPapyrusView(), null, "parent", null, 0, 1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusView_Profiles(), ecorePackage.getEPackage(), null, "profiles", null, 0, -1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusView_ModelRules(), this.getModelRule(), null, "modelRules", null, 1, -1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusView_OwningRules(), this.getOwningRule(), null, "owningRules", null, 1, -1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPapyrusView_ImplementationID(), ecorePackage.getEString(), "implementationID", null, 1, 1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusView_Categories(), this.getCategory(), null, "categories", null, 0, -1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(papyrusDiagramEClass, PapyrusDiagram.class, "PapyrusDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPapyrusDiagram_CustomPalette(), ecorePackage.getEString(), "customPalette", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPapyrusDiagram_CustomStyle(), ecorePackage.getEString(), "customStyle", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_ChildRules(), this.getChildRule(), null, "childRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_PaletteRules(), this.getPaletteRule(), null, "paletteRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusDiagram_Imports(), this.getElementImport(), null, "imports", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(papyrusSyncTableEClass, PapyrusSyncTable.class, "PapyrusSyncTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(papyrusTableEClass, PapyrusTable.class, "PapyrusTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPapyrusTable_Configuration(), ecorePackage.getEString(), "configuration", null, 1, 1, PapyrusTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(ruleEClass, Rule.class, "Rule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRule_Permit(), ecorePackage.getEBoolean(), "permit", "true", 1, 1, Rule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(modelRuleEClass, ModelRule.class, "ModelRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModelRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModelRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getModelRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModelRule_AutoSelectPath(), this.getPathElement(), null, "autoSelectPath", null, 0, -1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(owningRuleEClass, OwningRule.class, "OwningRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getOwningRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getOwningRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getOwningRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(childRuleEClass, ChildRule.class, "ChildRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getChildRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_Origin(), ecorePackage.getEClass(), null, "origin", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getChildRule_InsertionPath(), this.getPathElement(), null, "insertionPath", null, 0, -1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(paletteRuleEClass, PaletteRule.class, "PaletteRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPaletteRule_Element(), ecorePackage.getEString(), "element", null, 0, 1, PaletteRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pathElementEClass, PathElement.class, "PathElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPathElement_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, PathElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPathElement_Origin(), ecorePackage.getEClass(), null, "origin", null, 1, 1, PathElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getPathElement_Target(), ecorePackage.getEClass(), null, "target", null, 1, 1, PathElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(elementImportEClass, ElementImport.class, "ElementImport", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getElementImport_From(), this.getPapyrusDiagram(), null, "from", null, 1, 1, ElementImport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getElementImport_Element(), ecorePackage.getEClass(), null, "element", null, 1, 1, ElementImport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //ConfigurationPackageImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java
new file mode 100755
index 00000000000..d1f39a65d94
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java
@@ -0,0 +1,228 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element Import</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl#getFrom <em>From</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl#getElement <em>Element</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ElementImportImpl extends MinimalEObjectImpl.Container implements ElementImport {
+ /**
+ * The cached value of the '{@link #getFrom() <em>From</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFrom()
+ * @generated
+ * @ordered
+ */
+ protected PapyrusDiagram from;
+
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected EClass element;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ElementImportImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.ELEMENT_IMPORT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram getFrom() {
+ if (from != null && from.eIsProxy()) {
+ InternalEObject oldFrom = (InternalEObject)from;
+ from = (PapyrusDiagram)eResolveProxy(oldFrom);
+ if (from != oldFrom) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.ELEMENT_IMPORT__FROM, oldFrom, from));
+ }
+ }
+ return from;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusDiagram basicGetFrom() {
+ return from;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFrom(PapyrusDiagram newFrom) {
+ PapyrusDiagram oldFrom = from;
+ from = newFrom;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ELEMENT_IMPORT__FROM, oldFrom, from));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ if (element != null && element.eIsProxy()) {
+ InternalEObject oldElement = (InternalEObject)element;
+ element = (EClass)eResolveProxy(oldElement);
+ if (element != oldElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.ELEMENT_IMPORT__ELEMENT, oldElement, element));
+ }
+ }
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(EClass newElement) {
+ EClass oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ELEMENT_IMPORT__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.ELEMENT_IMPORT__FROM:
+ if (resolve) return getFrom();
+ return basicGetFrom();
+ case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
+ if (resolve) return getElement();
+ return basicGetElement();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.ELEMENT_IMPORT__FROM:
+ setFrom((PapyrusDiagram)newValue);
+ return;
+ case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
+ setElement((EClass)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.ELEMENT_IMPORT__FROM:
+ setFrom((PapyrusDiagram)null);
+ return;
+ case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
+ setElement((EClass)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.ELEMENT_IMPORT__FROM:
+ return from != null;
+ case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
+ return element != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ElementImportImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
new file mode 100755
index 00000000000..75149e650b0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
@@ -0,0 +1,321 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getMultiplicity <em>Multiplicity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getAutoSelectPath <em>Auto Select Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelRuleImpl extends RuleImpl implements ModelRule {
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected EClass element;
+
+ /**
+ * The cached value of the '{@link #getStereotypes() <em>Stereotypes</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<EClass> stereotypes;
+
+ /**
+ * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected static final int MULTIPLICITY_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected int multiplicity = MULTIPLICITY_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getAutoSelectPath() <em>Auto Select Path</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAutoSelectPath()
+ * @generated
+ * @ordered
+ */
+ protected EList<PathElement> autoSelectPath;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.MODEL_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ if (element != null && element.eIsProxy()) {
+ InternalEObject oldElement = (InternalEObject)element;
+ element = (EClass)eResolveProxy(oldElement);
+ if (element != oldElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODEL_RULE__ELEMENT, oldElement, element));
+ }
+ }
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(EClass newElement) {
+ EClass oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EClass> getStereotypes() {
+ if (stereotypes == null) {
+ stereotypes = new EObjectResolvingEList<EClass>(EClass.class, this, ConfigurationPackage.MODEL_RULE__STEREOTYPES);
+ }
+ return stereotypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMultiplicity(int newMultiplicity) {
+ int oldMultiplicity = multiplicity;
+ multiplicity = newMultiplicity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_RULE__MULTIPLICITY, oldMultiplicity, multiplicity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PathElement> getAutoSelectPath() {
+ if (autoSelectPath == null) {
+ autoSelectPath = new EObjectContainmentEList<PathElement>(PathElement.class, this, ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH);
+ }
+ return autoSelectPath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ return ((InternalEList<?>)getAutoSelectPath()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ if (resolve) return getElement();
+ return basicGetElement();
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ return getMultiplicity();
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ return getAutoSelectPath();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ setElement((EClass)newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>)newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ setMultiplicity((Integer)newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ getAutoSelectPath().clear();
+ getAutoSelectPath().addAll((Collection<? extends PathElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ setElement((EClass)null);
+ return;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ setMultiplicity(MULTIPLICITY_EDEFAULT);
+ return;
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ getAutoSelectPath().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ return multiplicity != MULTIPLICITY_EDEFAULT;
+ case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
+ return autoSelectPath != null && !autoSelectPath.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (multiplicity: ");
+ result.append(multiplicity);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ModelRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
new file mode 100755
index 00000000000..4b75d1292e8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
@@ -0,0 +1,272 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Owning Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getMultiplicity <em>Multiplicity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OwningRuleImpl extends RuleImpl implements OwningRule {
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected EClass element;
+
+ /**
+ * The cached value of the '{@link #getStereotypes() <em>Stereotypes</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<EClass> stereotypes;
+
+ /**
+ * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected static final int MULTIPLICITY_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected int multiplicity = MULTIPLICITY_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OwningRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.OWNING_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getElement() {
+ if (element != null && element.eIsProxy()) {
+ InternalEObject oldElement = (InternalEObject)element;
+ element = (EClass)eResolveProxy(oldElement);
+ if (element != oldElement) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.OWNING_RULE__ELEMENT, oldElement, element));
+ }
+ }
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(EClass newElement) {
+ EClass oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.OWNING_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EClass> getStereotypes() {
+ if (stereotypes == null) {
+ stereotypes = new EObjectResolvingEList<EClass>(EClass.class, this, ConfigurationPackage.OWNING_RULE__STEREOTYPES);
+ }
+ return stereotypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMultiplicity(int newMultiplicity) {
+ int oldMultiplicity = multiplicity;
+ multiplicity = newMultiplicity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.OWNING_RULE__MULTIPLICITY, oldMultiplicity, multiplicity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ if (resolve) return getElement();
+ return basicGetElement();
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ return getMultiplicity();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ setElement((EClass)newValue);
+ return;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>)newValue);
+ return;
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ setMultiplicity((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ setElement((EClass)null);
+ return;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ setMultiplicity(MULTIPLICITY_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ return multiplicity != MULTIPLICITY_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (multiplicity: ");
+ result.append(multiplicity);
+ result.append(')');
+ return result.toString();
+ }
+
+} //OwningRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java
new file mode 100755
index 00000000000..335799cd43a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java
@@ -0,0 +1,173 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Palette Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PaletteRuleImpl#getElement <em>Element</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
+ /**
+ * The default value of the '{@link #getElement() <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected static final String ELEMENT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getElement() <em>Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElement()
+ * @generated
+ * @ordered
+ */
+ protected String element = ELEMENT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PALETTE_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getElement() {
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElement(String newElement) {
+ String oldElement = element;
+ element = newElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PALETTE_RULE__ELEMENT, oldElement, element));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ return getElement();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ setElement((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ setElement(ELEMENT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ return ELEMENT_EDEFAULT == null ? element != null : !ELEMENT_EDEFAULT.equals(element);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (element: ");
+ result.append(element);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PaletteRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java
new file mode 100755
index 00000000000..e7f29683ff3
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java
@@ -0,0 +1,281 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl#getDefaultStakeholder <em>Default Stakeholder</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl#getMetamodel <em>Metamodel</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusConfigurationImpl#getCategories <em>Categories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implements PapyrusConfiguration {
+ /**
+ * The cached value of the '{@link #getDefaultStakeholder() <em>Default Stakeholder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDefaultStakeholder()
+ * @generated
+ * @ordered
+ */
+ protected Stakeholder defaultStakeholder;
+
+ /**
+ * The cached value of the '{@link #getMetamodel() <em>Metamodel</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMetamodel()
+ * @generated
+ * @ordered
+ */
+ protected EPackage metamodel;
+
+ /**
+ * The cached value of the '{@link #getCategories() <em>Categories</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCategories()
+ * @generated
+ * @ordered
+ */
+ protected EList<Category> categories;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Stakeholder getDefaultStakeholder() {
+ if (defaultStakeholder != null && defaultStakeholder.eIsProxy()) {
+ InternalEObject oldDefaultStakeholder = (InternalEObject)defaultStakeholder;
+ defaultStakeholder = (Stakeholder)eResolveProxy(oldDefaultStakeholder);
+ if (defaultStakeholder != oldDefaultStakeholder) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER, oldDefaultStakeholder, defaultStakeholder));
+ }
+ }
+ return defaultStakeholder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Stakeholder basicGetDefaultStakeholder() {
+ return defaultStakeholder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDefaultStakeholder(Stakeholder newDefaultStakeholder) {
+ Stakeholder oldDefaultStakeholder = defaultStakeholder;
+ defaultStakeholder = newDefaultStakeholder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER, oldDefaultStakeholder, defaultStakeholder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EPackage getMetamodel() {
+ if (metamodel != null && metamodel.eIsProxy()) {
+ InternalEObject oldMetamodel = (InternalEObject)metamodel;
+ metamodel = (EPackage)eResolveProxy(oldMetamodel);
+ if (metamodel != oldMetamodel) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL, oldMetamodel, metamodel));
+ }
+ }
+ return metamodel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EPackage basicGetMetamodel() {
+ return metamodel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMetamodel(EPackage newMetamodel) {
+ EPackage oldMetamodel = metamodel;
+ metamodel = newMetamodel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL, oldMetamodel, metamodel));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Category> getCategories() {
+ if (categories == null) {
+ categories = new EObjectContainmentEList<Category>(Category.class, this, ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES);
+ }
+ return categories;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return ((InternalEList<?>)getCategories()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ if (resolve) return getDefaultStakeholder();
+ return basicGetDefaultStakeholder();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ if (resolve) return getMetamodel();
+ return basicGetMetamodel();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return getCategories();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ setDefaultStakeholder((Stakeholder)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ setMetamodel((EPackage)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ getCategories().clear();
+ getCategories().addAll((Collection<? extends Category>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ setDefaultStakeholder((Stakeholder)null);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ setMetamodel((EPackage)null);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ getCategories().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ return defaultStakeholder != null;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ return metamodel != null;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return categories != null && !categories.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PapyrusConfigurationImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
new file mode 100755
index 00000000000..7aa81c0eb8f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
@@ -0,0 +1,354 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Diagram</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getCustomPalette <em>Custom Palette</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getCustomStyle <em>Custom Style</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getChildRules <em>Child Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getPaletteRules <em>Palette Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getImports <em>Imports</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagram {
+ /**
+ * The default value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomPalette()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_PALETTE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomPalette() <em>Custom Palette</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomPalette()
+ * @generated
+ * @ordered
+ */
+ protected String customPalette = CUSTOM_PALETTE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomStyle()
+ * @generated
+ * @ordered
+ */
+ protected static final String CUSTOM_STYLE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCustomStyle() <em>Custom Style</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCustomStyle()
+ * @generated
+ * @ordered
+ */
+ protected String customStyle = CUSTOM_STYLE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getChildRules() <em>Child Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChildRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<ChildRule> childRules;
+
+ /**
+ * The cached value of the '{@link #getPaletteRules() <em>Palette Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPaletteRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<PaletteRule> paletteRules;
+
+ /**
+ * The cached value of the '{@link #getImports() <em>Imports</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected EList<ElementImport> imports;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusDiagramImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_DIAGRAM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomPalette() {
+ return customPalette;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomPalette(String newCustomPalette) {
+ String oldCustomPalette = customPalette;
+ customPalette = newCustomPalette;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE, oldCustomPalette, customPalette));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCustomStyle() {
+ return customStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCustomStyle(String newCustomStyle) {
+ String oldCustomStyle = customStyle;
+ customStyle = newCustomStyle;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE, oldCustomStyle, customStyle));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ChildRule> getChildRules() {
+ if (childRules == null) {
+ childRules = new EObjectContainmentEList<ChildRule>(ChildRule.class, this, ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES);
+ }
+ return childRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PaletteRule> getPaletteRules() {
+ if (paletteRules == null) {
+ paletteRules = new EObjectContainmentEList<PaletteRule>(PaletteRule.class, this, ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES);
+ }
+ return paletteRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ElementImport> getImports() {
+ if (imports == null) {
+ imports = new EObjectContainmentEList<ElementImport>(ElementImport.class, this, ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS);
+ }
+ return imports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return ((InternalEList<?>)getChildRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return ((InternalEList<?>)getPaletteRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ return ((InternalEList<?>)getImports()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return getCustomPalette();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return getCustomStyle();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return getChildRules();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return getPaletteRules();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ return getImports();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette((String)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle((String)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ getChildRules().addAll((Collection<? extends ChildRule>)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ getPaletteRules().addAll((Collection<? extends PaletteRule>)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ getImports().clear();
+ getImports().addAll((Collection<? extends ElementImport>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette(CUSTOM_PALETTE_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle(CUSTOM_STYLE_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ getImports().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return CUSTOM_PALETTE_EDEFAULT == null ? customPalette != null : !CUSTOM_PALETTE_EDEFAULT.equals(customPalette);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return CUSTOM_STYLE_EDEFAULT == null ? customStyle != null : !CUSTOM_STYLE_EDEFAULT.equals(customStyle);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return childRules != null && !childRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return paletteRules != null && !paletteRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
+ return imports != null && !imports.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (customPalette: ");
+ result.append(customPalette);
+ result.append(", customStyle: ");
+ result.append(customStyle);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusDiagramImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java
new file mode 100755
index 00000000000..d6ff1bbd4b6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java
@@ -0,0 +1,50 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Sync Table</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusSyncTableImpl extends PapyrusViewImpl implements PapyrusSyncTable {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusSyncTableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_SYNC_TABLE;
+ }
+
+} //PapyrusSyncTableImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java
new file mode 100755
index 00000000000..5c8b68a7c4a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java
@@ -0,0 +1,173 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Table</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusTableImpl#getConfiguration <em>Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
+ /**
+ * The default value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConfiguration()
+ * @generated
+ * @ordered
+ */
+ protected static final String CONFIGURATION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConfiguration()
+ * @generated
+ * @ordered
+ */
+ protected String configuration = CONFIGURATION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusTableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_TABLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setConfiguration(String newConfiguration) {
+ String oldConfiguration = configuration;
+ configuration = newConfiguration;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION, oldConfiguration, configuration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ return getConfiguration();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ setConfiguration((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ setConfiguration(CONFIGURATION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (configuration: ");
+ result.append(configuration);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusTableImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java
new file mode 100755
index 00000000000..39b6dd9261d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java
@@ -0,0 +1,442 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus View</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getIcon <em>Icon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getProfiles <em>Profiles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getModelRules <em>Model Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getOwningRules <em>Owning Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getImplementationID <em>Implementation ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewImpl#getCategories <em>Categories</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
+ /**
+ * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected static final String ICON_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIcon()
+ * @generated
+ * @ordered
+ */
+ protected String icon = ICON_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getParent() <em>Parent</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParent()
+ * @generated
+ * @ordered
+ */
+ protected PapyrusView parent;
+ /**
+ * The cached value of the '{@link #getProfiles() <em>Profiles</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getProfiles()
+ * @generated
+ * @ordered
+ */
+ protected EList<EPackage> profiles;
+ /**
+ * The cached value of the '{@link #getModelRules() <em>Model Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getModelRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<ModelRule> modelRules;
+ /**
+ * The cached value of the '{@link #getOwningRules() <em>Owning Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOwningRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<OwningRule> owningRules;
+
+ /**
+ * The default value of the '{@link #getImplementationID() <em>Implementation ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImplementationID()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPLEMENTATION_ID_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getImplementationID() <em>Implementation ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImplementationID()
+ * @generated
+ * @ordered
+ */
+ protected String implementationID = IMPLEMENTATION_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getCategories() <em>Categories</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCategories()
+ * @generated
+ * @ordered
+ */
+ protected EList<Category> categories;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusViewImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_VIEW;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getIcon() {
+ return icon;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIcon(String newIcon) {
+ String oldIcon = icon;
+ icon = newIcon;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__ICON, oldIcon, icon));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusView getParent() {
+ if (parent != null && parent.eIsProxy()) {
+ InternalEObject oldParent = (InternalEObject)parent;
+ parent = (PapyrusView)eResolveProxy(oldParent);
+ if (parent != oldParent) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_VIEW__PARENT, oldParent, parent));
+ }
+ }
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusView basicGetParent() {
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(PapyrusView newParent) {
+ PapyrusView oldParent = parent;
+ parent = newParent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__PARENT, oldParent, parent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<EPackage> getProfiles() {
+ if (profiles == null) {
+ profiles = new EObjectResolvingEList<EPackage>(EPackage.class, this, ConfigurationPackage.PAPYRUS_VIEW__PROFILES);
+ }
+ return profiles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ModelRule> getModelRules() {
+ if (modelRules == null) {
+ modelRules = new EObjectContainmentEList<ModelRule>(ModelRule.class, this, ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES);
+ }
+ return modelRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<OwningRule> getOwningRules() {
+ if (owningRules == null) {
+ owningRules = new EObjectContainmentEList<OwningRule>(OwningRule.class, this, ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES);
+ }
+ return owningRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImplementationID() {
+ return implementationID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImplementationID(String newImplementationID) {
+ String oldImplementationID = implementationID;
+ implementationID = newImplementationID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID, oldImplementationID, implementationID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Category> getCategories() {
+ if (categories == null) {
+ categories = new EObjectResolvingEList<Category>(Category.class, this, ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES);
+ }
+ return categories;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return ((InternalEList<?>)getModelRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return ((InternalEList<?>)getOwningRules()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ return getIcon();
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ if (resolve) return getParent();
+ return basicGetParent();
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ return getProfiles();
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return getModelRules();
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return getOwningRules();
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ return getImplementationID();
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ return getCategories();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ setIcon((String)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ setParent((PapyrusView)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ getProfiles().clear();
+ getProfiles().addAll((Collection<? extends EPackage>)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ getModelRules().clear();
+ getModelRules().addAll((Collection<? extends ModelRule>)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ getOwningRules().clear();
+ getOwningRules().addAll((Collection<? extends OwningRule>)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ setImplementationID((String)newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ getCategories().clear();
+ getCategories().addAll((Collection<? extends Category>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ setIcon(ICON_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ setParent((PapyrusView)null);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ getProfiles().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ getModelRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ getOwningRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ setImplementationID(IMPLEMENTATION_ID_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ getCategories().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ return parent != null;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ return profiles != null && !profiles.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return modelRules != null && !modelRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return owningRules != null && !owningRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ return IMPLEMENTATION_ID_EDEFAULT == null ? implementationID != null : !IMPLEMENTATION_ID_EDEFAULT.equals(implementationID);
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ return categories != null && !categories.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (icon: ");
+ result.append(icon);
+ result.append(", implementationID: ");
+ result.append(implementationID);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PapyrusViewImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java
new file mode 100755
index 00000000000..dcdbe97229e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusViewpointImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements PapyrusViewpoint {
+ /**
+ * The cached value of the '{@link #getParent() <em>Parent</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParent()
+ * @generated
+ * @ordered
+ */
+ protected PapyrusViewpoint parent;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PAPYRUS_VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewpoint getParent() {
+ if (parent != null && parent.eIsProxy()) {
+ InternalEObject oldParent = (InternalEObject)parent;
+ parent = (PapyrusViewpoint)eResolveProxy(oldParent);
+ if (parent != oldParent) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT, oldParent, parent));
+ }
+ }
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewpoint basicGetParent() {
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(PapyrusViewpoint newParent) {
+ PapyrusViewpoint oldParent = parent;
+ parent = newParent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT, oldParent, parent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ if (resolve) return getParent();
+ return basicGetParent();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ setParent((PapyrusViewpoint)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ setParent((PapyrusViewpoint)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ return parent != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PapyrusViewpointImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
new file mode 100755
index 00000000000..20cf5683b4d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Path Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PathElementImpl#getTarget <em>Target</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PathElementImpl extends MinimalEObjectImpl.Container implements PathElement {
+ /**
+ * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFeature()
+ * @generated
+ * @ordered
+ */
+ protected EReference feature;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PathElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.PATH_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFeature() {
+ if (feature != null && feature.eIsProxy()) {
+ InternalEObject oldFeature = (InternalEObject)feature;
+ feature = (EReference)eResolveProxy(oldFeature);
+ if (feature != oldFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
+ }
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetFeature() {
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFeature(EReference newFeature) {
+ EReference oldFeature = feature;
+ feature = newFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrigin() {
+ EClass origin = basicGetOrigin();
+ return origin != null && origin.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)origin) : origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ public EClass basicGetOrigin() {
+ if (this.eContainer() instanceof ChildRule)
+ return basicGetOriginChildRule();
+ return basicGetOriginModelRule();
+ }
+
+ private EClass basicGetOriginChildRule() {
+ ChildRule rule = (ChildRule) this.eContainer();
+ return basicGetOriginFrom(rule.getInsertionPath(), rule.getOrigin());
+ }
+
+ private EClass basicGetOriginModelRule() {
+ ModelRule rule = (ModelRule)this.eContainer();
+ PapyrusView view = (PapyrusView) rule.eContainer();
+ OwningRule or = (view.getOwningRules().size() >= 1) ? view.getOwningRules().get(0) : null;
+ if (or != null)
+ return basicGetOriginFrom(rule.getAutoSelectPath(), or.getElement());
+ return null;
+ }
+
+ private EClass basicGetOriginFrom(EList<PathElement> list, EClass from) {
+ EClass current = from;
+ int index = 0;
+ while ((current != null) && list.get(index) != this) {
+ EReference feature = list.get(index).getFeature();
+ if (!current.getEAllReferences().contains(feature))
+ return null;
+ current = feature.getEReferenceType();
+ index++;
+ }
+ return current;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTarget() {
+ EClass target = basicGetTarget();
+ return target != null && target.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)target) : target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ public EClass basicGetTarget() {
+ EReference feature = this.getFeature();
+ if (feature == null)
+ return null;
+ EClass origin = basicGetOrigin();
+ if (origin == null)
+ return null;
+ if (!origin.getEAllReferences().contains(feature))
+ return null;
+ return feature.getEReferenceType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ if (resolve) return getFeature();
+ return basicGetFeature();
+ case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
+ if (resolve) return getOrigin();
+ return basicGetOrigin();
+ case ConfigurationPackage.PATH_ELEMENT__TARGET:
+ if (resolve) return getTarget();
+ return basicGetTarget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ return feature != null;
+ case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
+ return basicGetOrigin() != null;
+ case ConfigurationPackage.PATH_ELEMENT__TARGET:
+ return basicGetTarget() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PathElementImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java
new file mode 100755
index 00000000000..f0e50106366
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java
@@ -0,0 +1,174 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Rule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.RuleImpl#isPermit <em>Permit</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class RuleImpl extends MinimalEObjectImpl.Container implements Rule {
+ /**
+ * The default value of the '{@link #isPermit() <em>Permit</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isPermit()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean PERMIT_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isPermit() <em>Permit</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isPermit()
+ * @generated
+ * @ordered
+ */
+ protected boolean permit = PERMIT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isPermit() {
+ return permit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPermit(boolean newPermit) {
+ boolean oldPermit = permit;
+ permit = newPermit;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.RULE__PERMIT, oldPermit, permit));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.RULE__PERMIT:
+ return isPermit();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.RULE__PERMIT:
+ setPermit((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.RULE__PERMIT:
+ setPermit(PERMIT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.RULE__PERMIT:
+ return permit != PERMIT_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (permit: ");
+ result.append(permit);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
new file mode 100755
index 00000000000..b4a8bfdad47
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
@@ -0,0 +1,438 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.viewpoints.configuration.*;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage
+ * @generated
+ */
+public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConfigurationSwitch<Adapter> modelSwitch =
+ new ConfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusConfiguration(PapyrusConfiguration object) {
+ return createPapyrusConfigurationAdapter();
+ }
+ @Override
+ public Adapter casePapyrusViewpoint(PapyrusViewpoint object) {
+ return createPapyrusViewpointAdapter();
+ }
+ @Override
+ public Adapter casePapyrusView(PapyrusView object) {
+ return createPapyrusViewAdapter();
+ }
+ @Override
+ public Adapter casePapyrusDiagram(PapyrusDiagram object) {
+ return createPapyrusDiagramAdapter();
+ }
+ @Override
+ public Adapter casePapyrusSyncTable(PapyrusSyncTable object) {
+ return createPapyrusSyncTableAdapter();
+ }
+ @Override
+ public Adapter casePapyrusTable(PapyrusTable object) {
+ return createPapyrusTableAdapter();
+ }
+ @Override
+ public Adapter caseRule(Rule object) {
+ return createRuleAdapter();
+ }
+ @Override
+ public Adapter caseModelRule(ModelRule object) {
+ return createModelRuleAdapter();
+ }
+ @Override
+ public Adapter caseOwningRule(OwningRule object) {
+ return createOwningRuleAdapter();
+ }
+ @Override
+ public Adapter caseChildRule(ChildRule object) {
+ return createChildRuleAdapter();
+ }
+ @Override
+ public Adapter casePaletteRule(PaletteRule object) {
+ return createPaletteRuleAdapter();
+ }
+ @Override
+ public Adapter casePathElement(PathElement object) {
+ return createPathElementAdapter();
+ }
+ @Override
+ public Adapter caseCategory(Category object) {
+ return createCategoryAdapter();
+ }
+ @Override
+ public Adapter caseElementImport(ElementImport object) {
+ return createElementImportAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureFramework(ArchitectureFramework object) {
+ return createArchitectureFrameworkAdapter();
+ }
+ @Override
+ public Adapter caseADElement(ADElement object) {
+ return createADElementAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureViewpoint(ArchitectureViewpoint object) {
+ return createArchitectureViewpointAdapter();
+ }
+ @Override
+ public Adapter caseModelKind(ModelKind object) {
+ return createModelKindAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration <em>Papyrus Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration
+ * @generated
+ */
+ public Adapter createPapyrusConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint <em>Papyrus Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint
+ * @generated
+ */
+ public Adapter createPapyrusViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView <em>Papyrus View</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView
+ * @generated
+ */
+ public Adapter createPapyrusViewAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram <em>Papyrus Diagram</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram
+ * @generated
+ */
+ public Adapter createPapyrusDiagramAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable <em>Papyrus Sync Table</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable
+ * @generated
+ */
+ public Adapter createPapyrusSyncTableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable <em>Papyrus Table</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable
+ * @generated
+ */
+ public Adapter createPapyrusTableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule <em>Model Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule
+ * @generated
+ */
+ public Adapter createModelRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule <em>Owning Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule
+ * @generated
+ */
+ public Adapter createOwningRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule <em>Child Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule
+ * @generated
+ */
+ public Adapter createChildRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule <em>Palette Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule
+ * @generated
+ */
+ public Adapter createPaletteRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Rule <em>Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Rule
+ * @generated
+ */
+ public Adapter createRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement <em>Path Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PathElement
+ * @generated
+ */
+ public Adapter createPathElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.Category <em>Category</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.Category
+ * @generated
+ */
+ public Adapter createCategoryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport <em>Element Import</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport
+ * @generated
+ */
+ public Adapter createElementImportAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework <em>Architecture Framework</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework
+ * @generated
+ */
+ public Adapter createArchitectureFrameworkAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement <em>AD Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement
+ * @generated
+ */
+ public Adapter createADElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint <em>Architecture Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint
+ * @generated
+ */
+ public Adapter createArchitectureViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind <em>Model Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind
+ * @generated
+ */
+ public Adapter createModelKindAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //ConfigurationAdapterFactory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
new file mode 100755
index 00000000000..4b8fceb879a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
@@ -0,0 +1,474 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.configuration.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.infra.viewpoints.configuration.*;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage
+ * @generated
+ */
+public class ConfigurationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConfigurationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION: {
+ PapyrusConfiguration papyrusConfiguration = (PapyrusConfiguration)theEObject;
+ T result = casePapyrusConfiguration(papyrusConfiguration);
+ if (result == null) result = caseArchitectureFramework(papyrusConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT: {
+ PapyrusViewpoint papyrusViewpoint = (PapyrusViewpoint)theEObject;
+ T result = casePapyrusViewpoint(papyrusViewpoint);
+ if (result == null) result = caseArchitectureViewpoint(papyrusViewpoint);
+ if (result == null) result = caseADElement(papyrusViewpoint);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_VIEW: {
+ PapyrusView papyrusView = (PapyrusView)theEObject;
+ T result = casePapyrusView(papyrusView);
+ if (result == null) result = caseModelKind(papyrusView);
+ if (result == null) result = caseADElement(papyrusView);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_DIAGRAM: {
+ PapyrusDiagram papyrusDiagram = (PapyrusDiagram)theEObject;
+ T result = casePapyrusDiagram(papyrusDiagram);
+ if (result == null) result = casePapyrusView(papyrusDiagram);
+ if (result == null) result = caseModelKind(papyrusDiagram);
+ if (result == null) result = caseADElement(papyrusDiagram);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_SYNC_TABLE: {
+ PapyrusSyncTable papyrusSyncTable = (PapyrusSyncTable)theEObject;
+ T result = casePapyrusSyncTable(papyrusSyncTable);
+ if (result == null) result = casePapyrusView(papyrusSyncTable);
+ if (result == null) result = caseModelKind(papyrusSyncTable);
+ if (result == null) result = caseADElement(papyrusSyncTable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_TABLE: {
+ PapyrusTable papyrusTable = (PapyrusTable)theEObject;
+ T result = casePapyrusTable(papyrusTable);
+ if (result == null) result = casePapyrusView(papyrusTable);
+ if (result == null) result = caseModelKind(papyrusTable);
+ if (result == null) result = caseADElement(papyrusTable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.RULE: {
+ Rule rule = (Rule)theEObject;
+ T result = caseRule(rule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.MODEL_RULE: {
+ ModelRule modelRule = (ModelRule)theEObject;
+ T result = caseModelRule(modelRule);
+ if (result == null) result = caseRule(modelRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.OWNING_RULE: {
+ OwningRule owningRule = (OwningRule)theEObject;
+ T result = caseOwningRule(owningRule);
+ if (result == null) result = caseRule(owningRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.CHILD_RULE: {
+ ChildRule childRule = (ChildRule)theEObject;
+ T result = caseChildRule(childRule);
+ if (result == null) result = caseRule(childRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PALETTE_RULE: {
+ PaletteRule paletteRule = (PaletteRule)theEObject;
+ T result = casePaletteRule(paletteRule);
+ if (result == null) result = caseRule(paletteRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.PATH_ELEMENT: {
+ PathElement pathElement = (PathElement)theEObject;
+ T result = casePathElement(pathElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.CATEGORY: {
+ Category category = (Category)theEObject;
+ T result = caseCategory(category);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ConfigurationPackage.ELEMENT_IMPORT: {
+ ElementImport elementImport = (ElementImport)theEObject;
+ T result = caseElementImport(elementImport);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusConfiguration(PapyrusConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusViewpoint(PapyrusViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus View</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus View</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusView(PapyrusView object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Diagram</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Diagram</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusDiagram(PapyrusDiagram object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Sync Table</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Sync Table</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusSyncTable(PapyrusSyncTable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus Table</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus Table</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusTable(PapyrusTable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelRule(ModelRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Owning Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Owning Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOwningRule(OwningRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Child Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Child Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseChildRule(ChildRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Palette Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Palette Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePaletteRule(PaletteRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRule(Rule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Path Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Path Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePathElement(PathElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Category</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Category</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCategory(Category object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Element Import</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Element Import</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseElementImport(ElementImport object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Framework</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Framework</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureFramework(ArchitectureFramework object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseADElement(ADElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureViewpoint(ArchitectureViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Kind</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Kind</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelKind(ModelKind object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //ConfigurationSwitch
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath
index 1bdc2a0ba05..f6e5811e42c 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.classpath
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.classpath
@@ -1,7 +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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project
index ee1b7fbad63..149c81a950e 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/.project
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.robotml.diagram.datatypedef</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..bcaa1b4d07e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//resources/viewpoints-toc.xml=utf-8
+encoding//resources/viewpoints.html=utf-8
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..e3d951c84cf
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.doc;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.help
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html
new file mode 100755
index 00000000000..dd02e0be168
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties
new file mode 100755
index 00000000000..655978a2bc6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/build.properties
@@ -0,0 +1,6 @@
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties,\
+ resources/
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties
new file mode 100755
index 00000000000..1ffd68f5ccb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.properties
@@ -0,0 +1,16 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Documentation (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml
new file mode 100755
index 00000000000..2fba0cfd74f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="resources/viewpoints-toc.xml"
+ primary="false">
+ </toc>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png
new file mode 100755
index 00000000000..bb9214c7737
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/config_sample.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png
new file mode 100755
index 00000000000..b0ff70d7be2
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_filtered.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png
new file mode 100755
index 00000000000..6a2ab29f149
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/menu_normal.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png
new file mode 100755
index 00000000000..a37393eb942
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/preferences.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png
new file mode 100755
index 00000000000..1912f7f2f9e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/captures/properties.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml
new file mode 100755
index 00000000000..ae66f735f36
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints-toc.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="viewpoints" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocUser" topic="resources/viewpoints.html">
+ <topic href="resources/viewpoints.html" label="Viewpoints in Papyrus">
+ <topic href="resources/viewpoints.html#Introduction" label="Introduction"></topic>
+ <topic href="resources/viewpoints.html#Impacts_of_Viewpoints_in_the_Papyrus_Interface" label="Impacts of Viewpoints in the Papyrus Interface">
+ <topic href="resources/viewpoints.html#Contextual_Menus" label="Contextual Menus"></topic>
+ <topic href="resources/viewpoints.html#Toolbar_Elements" label="Toolbar Elements"></topic>
+ <topic href="resources/viewpoints.html#Diagram_Properties" label="Diagram Properties"></topic>
+ </topic>
+ <topic href="resources/viewpoints.html#Changing_the_Applied_Viewpoint" label="Changing the Applied Viewpoint">
+ <topic href="resources/viewpoints.html#Configuration_Kinds" label="Configuration Kinds">
+ <topic href="resources/viewpoints.html#Built-in_Configurations" label="Built-in Configurations"></topic>
+ <topic href="resources/viewpoints.html#Extension_Point-Defined_Configuration" label="Extension Point-Defined Configuration"></topic>
+ <topic href="resources/viewpoints.html#Custom_Configuration" label="Custom Configuration"></topic>
+ </topic>
+ <topic href="resources/viewpoints.html#Stakeholder_and_Viewpoint_Selection" label="Stakeholder and Viewpoint Selection"></topic>
+ </topic>
+ <topic href="resources/viewpoints.html#Defining_New_Viewpoints" label="Defining New Viewpoints">
+ <topic href="resources/viewpoints.html#Available_Concepts" label="Available Concepts"></topic>
+ <topic href="resources/viewpoints.html#Building_a_Configuration" label="Building a Configuration">
+ <topic href="resources/viewpoints.html#Configuration_element" label="Configuration element"></topic>
+ <topic href="resources/viewpoints.html#Stakeholders_and_Viewpoints" label="Stakeholders and Viewpoints"></topic>
+ <topic href="resources/viewpoints.html#Diagram_element" label="Diagram element"></topic>
+ <topic href="resources/viewpoints.html#Viewpoint_Enforcement_Principles" label="Viewpoint Enforcement Principles"></topic>
+ </topic>
+ </topic>
+ </topic>
+</toc>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html
new file mode 100755
index 00000000000..dacce45f8f6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.html
@@ -0,0 +1,34 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Viewpoints_in_Papyrus">Viewpoints in Papyrus</h1><h2 id="Introduction">Introduction</h2><p>Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views.
+The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization.
+Papyrus also define additional views, including textual ones.</p><h2 id="Impacts_of_Viewpoints_in_the_Papyrus_Interface">Impacts of Viewpoints in the Papyrus Interface</h2><p>The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do.
+Viewpoints also have impacts on the edition experience of the model themselves.</p><h3 id="Contextual_Menus">Contextual Menus</h3><p>The definition a viewpoints specify which views and diagrams can be applied to specified model elements.
+A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint.
+For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint.</p><table><tr><td><img border="0" src="captures/menu_normal.png"/></td><td><img border="0" src="captures/menu_filtered.png"/></td></tr></table><h3 id="Toolbar_Elements">Toolbar Elements</h3><p>The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint.
+The elements that appeat in the contextual menus should also appear in the toolbar.</p><h3 id="Diagram_Properties">Diagram Properties</h3><p>Papyrus views and diagrams have a set of properties related to the management of viewpoints.
+They are visible in the <b>Properties</b> view of the diagrams.</p><p><img border="0" src="captures/properties.png"/></p><p>In the image above the selected diagram have two properties related to the management of viewpoints:</p><ul><li><b>View Type</b>: This property shows the diagram's type as defined in the viewpoints' configuration. In the example above, it is a <i>UML Activity Diagram</i>, part of the <i>Default Papyrus Viewpoint</i> configuration.</li><li><b>Owner</b>: This property shows the current owner of the diagram, i.e. the model element which the diagram is attached to. In the example above, the diagram is within the <i>Diagrams</i> package, meaning this package owns the diagram.</li><li><b>Root element</b>: This property shows the model element that is visualized through the diagram. In the example above, the top element visualized in the selected diagram is the UML activity named <i>Activity1</i>. It is possible to retarget a diagram, i.e. change its root element. The user will be prompted to select a model element that fits the constraints that apply for this type of diagram.</li></ul><h2 id="Changing_the_Applied_Viewpoint">Changing the Applied Viewpoint</h2><p>The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name <b>Viewpoints Configuration</b>.
+The panel looks like the following:</p><p><img border="0" src="captures/preferences.png"/></p><h3 id="Configuration_Kinds">Configuration Kinds</h3><p>The first preference element is the selection of the kind of configuration to apply to the user's environment.
+In the above capture, the radio buttons are used to determine which kind of configuration to use.
+Papyrus comes with two built-in configurations.
+It is nevertheless possible to define new configurations and viewpoints, and select them in this position.</p><h4 id="Built-in_Configurations">Built-in Configurations</h4><p>The built-in configurations are provided for convenience and have the following properties:</p><ul><li><i>Any number of diagrams per model element</i> is a configuration with a viewpoint that allow any kind of view and diagram and does not restrain the number of diagrams that can be created for each model element.</li><li><i>At most one diagram per model element</i> is a configuration with a viewpoint that allow any kind of view and diagram but limit the number of diagrams that can be created for each model element at one.</li></ul><h4 id="Extension_Point-Defined_Configuration">Extension Point-Defined Configuration</h4><p>It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point.
+The identifier of the extension point to use is <i>org.eclipse.papyrus.infra.viewpoints.policy.custom</i> and is defined in the <i>org.eclipse.papyrus.infra.viewpoints.policy</i> plugin.
+Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest).
+The setting of the contributed configuration is achieved by giving the path to the configuration file.
+The path can be relative to the contributing plugin's root, or be an absolute URI in the form of <i>platform:/plugin/&lt;pluginID&gt;/&lt;path&gt;</i>.
+If no contribution is made and this option is selected, the builtin configuration named <i>Any number of diagrams per model element</i> will be used as a fallback.</p><h4 id="Custom_Configuration">Custom Configuration</h4><p>To select a custom configuration, choose the <i>Custom</i> option.
+This will activate the corresponding preferences fields:</p><ul><li><i>Access scheme</i> lets the user select how the custom configuration should be looked for. The possible options are:<ul><li><i>Absolute path</i> means that the configuration will be looked for on the host's file system.</li><li><i>Workspace file</i> means that the configuration file will be looked for as a resource in the workspace.</li><li><i>Embedded in a plugin</i> means that the configuration file will be looked for as a resource in a loaded Eclipse plugin.</li></ul></li></ul><ul><li><i>Path</i> lets the user select the configuration file based on the selected scheme:<ul><li>Using the scheme <i>Absolute path</i> the file is selected using a simple file selection dialog.</li><li>Using the scheme <i>Workspace file</i> the file is selected using a workspace resource selection dialog.</li><li>Using the scheme <i>Embedded in a plugin</i> the file is selected using a plugin content selection dialog.</li></ul></li></ul><h3 id="Stakeholder_and_Viewpoint_Selection">Stakeholder and Viewpoint Selection</h3><p>Once a configuration is selected, the use can select one of the viewpoint defined within it.
+This is achieved through the two dropdown boxes:</p><ul><li><i>Stakeholder</i> is used to select the user's archetype</li><li><i>Viewpoint</i> is used to select the viewpoint</li></ul><h2 id="Defining_New_Viewpoints">Defining New Viewpoints</h2><p>Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel.
+A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus.</p><h3 id="Available_Concepts">Available Concepts</h3><p>This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus.
+It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints.</p><ul><li>A <i>configuration</i> is a specification of a set of <i>viewpoints</i> and <i>stakeholders</i>. A <i>configuration</i> is typically stored in a .configuration file and has to be selected in the preference window (Window/Preferences/Papyrus/Viewpoints Configuration).</li><li>The concept of <i>stakeholder</i> (see ISO 42010) in Papyrus represents a user archetype that pertains in the construction and/or review of a model. A <i>stakeholder</i> is associated to a set of <i>viewpoints</i> defining how he/she can see a model.</li><li>The concept of <i>viewpoint</i> (see ISO 42010) in Papyrus represents a set of constrains about what can be seen in a model. A Papyrus <i>viewpoint</i> mainly defines what are the accessible <i>diagrams</i> and the particular constraints to be applied on each of them.</li><li>A Papyrus <i>diagram</i> is a specialized view on a model in the form of a visual language. It is supported by an implementation artifact, i.e. the actual code that implements the diagram. Moreover, it can be constrained using <i>rules</i>.</li><li>A <i>model rule</i> specifies if a model element can be represented through a <i>diagram</i>, i.e. whether it can be selected as the root element of a <i>diagram</i>.</li><li>An <i>owning rule</i> specifies whether a model element is allowed to own a <i>diagram</i>.</li><li><i>Child rules</i> specify whether a given model element can be added to the model through a <i>diagram</i>.</li><li><i>Palette rules</i> specify the palette elements that are visible for a <i>diagram</i>.</li></ul><h3 id="Building_a_Configuration">Building a Configuration</h3><p>The first step is to create the configuration file.
+Papyrus comes with a wizard for this purpose:</p><ul><li>In the contextual menu of a project, or in the Eclipse <b>File'' menu, select '''New</b>, <b>Other ...</b>.</li><li>The wizard is called <b>Viewpoints configuration</b> and is located in the <b>Papyrus</b> category.</li></ul><h4 id="Configuration_element">Configuration element</h4><p>Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor.
+The top element is the <i>configuration</i>.
+It has two properties:</p><ul><li><i>Default Stakeholder</i>, which should be used to select the default stakeholder for this configuration (once one has been created).</li><li><i>Metamodel</i>, which should be used to select the metamodel on which the viewpoint will apply. The property field proposes a list of the loaded metamodels identified by their URI. Usually, the UML metamodel (<a href="http://www.eclipse.org/uml2/4.0.0/UML/">http://www.eclipse.org/uml2/4.0.0/UML/</a>) should be used.</li></ul><h4 id="Stakeholders_and_Viewpoints">Stakeholders and Viewpoints</h4><p>It is then possible to add new <i>Viewpoints</i> and <i>Stakeholders</i> to the configuration by the conxtual menu <b>New Child</b> on the configuration element.
+A <i>stakeholder</i> has two properties, <i>name</i>' and <i>viewpoints</i>. The <i>viewpoints</i> properties must be filled with references to the appropriate viewpoints for the <i>stakeholder</i>.
+A <i>viewpoint</i> also has two properties, <i>name</i> and <i>parent</i>. The <i>parent</i> property is used to specify that a <i>viewpoint</i> inherits from another one.</p><h4 id="Diagram_element">Diagram element</h4><p>Once a viewpoint has been created, it is possible to add to it <i>diagrams</i> using the <b>New Child</b> contextual menu.
+A <i>diagram</i> will define a specialized view on a model, based on the implementation in Papyrus.
+For this purpose, the <i>diagram</i> elements have the following properties:</p><ul><li><i>name</i>, which specifies a descriptor for the diagram</li><li><i>parent</i>, which enables the declaration of an inheritance relationship with another diagram</li><li><i>implementation ID</i>, which is the unique identifier of the software component in papyrus that will effectively implements the diagram</li><li><i>profiles</i>, which is the set of profiles that need to be applied for this diagram. The profiles can be selected through their metamodel identified by their URI. This implies that the profiles must be loaded at this point.</li></ul><p>The list of recognized implementation IDs is as follow:</p><table border="solid 1px grey"><tr><th>Implementation ID</th><th>Description</th></tr><tr><td><b>PapyrusUMLActivityDiagram</b></td><td>UML Activity Diagram</td></tr><tr><td><b>PapyrusUMLClassDiagram</b></td><td>UML Class Diagram</td></tr><tr><td><b>PapyrusUMLCommunicationDiagram</b></td><td>UML Communication Diagram</td></tr><tr><td><b>PapyrusUMLComponentDiagram</b></td><td>UML Component Diagram</td></tr><tr><td><b>CompositeStructure</b></td><td>UML Composite Diagram</td></tr><tr><td><b>PapyrusUMLDeploymentDiagram</b></td><td>UML Deployment Diagram</td></tr><tr><td><b>PapyrusUMLProfileDiagram</b></td><td>UML Profile Diagram</td></tr><tr><td><b>PapyrusUMLSequenceDiagram</b></td><td>UML Sequence Diagram</td></tr><tr><td><b>PapyrusUMLStateMachineDiagram</b></td><td>UML State Machine Diagram</td></tr><tr><td><b>PapyrusUMLTimingDiagram</b></td><td>UML Timing Diagram</td></tr><tr><td><b>UseCase</b></td><td>UML Use Case Diagram</td></tr><tr><td><b>PapyrusUMLInteractionOverviewDiagram</b></td><td>UML Interaction Overview Diagram</td></tr><tr><td><b>BlockDefinition</b></td><td>SysML Block Definition Diagram</td></tr><tr><td><b>InternalBlock</b></td><td>SysML Internal Block Diagram</td></tr><tr><td><b>Parametric</b></td><td>SysML Parametric Diagram</td></tr><tr><td><b>RequirementDiagram</b></td><td>SysML Requirements Diagram</td></tr></table><p>Once a diagram has been created it is possible to constraint it using rules.
+There are four kinds of rules:</p><ul><li><i>Model rules</i> constrain the type of the (root) model elements that can be visualized through this view.</li><li><i>Owning rules</i> constrain the type of the model elements that can own the diagram itself.</li><li><i>Child rules</i> constrain the type of the model elements that can be dropped within this diagram.</li><li><i>Palette rules</i> constrain the display of the diagram's palette elements.</li></ul><p>Each rule has a <i>permit</i> property that specify whether the rule authorizes or forbids the action it represents.
+Otherwise, the properties of the rules are as follow:</p><ul><li><i>Model rules</i><ul><li><i>element</i> represents the type of the model elements to apply the rule on.</li><li><i>multiplicity</i> represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li></ul></li><li><i>Owning rules</i><ul><li><i>element</i> represents the type of the model elements to apply the rule on.</li><li><i>multiplicity</i> represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li></ul></li><li><i>Child rules</i><ul><li><i>element</i> represents the type of the model elements begin dropped.</li><li><i>stereotypes</i> represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the <i>profiles</i> defined in the parent diagram.</li><li><i>origin</i> represents the type of the model elements that are the target of the drop. It is usually one of the type defined in the <i>model rules</i>.</li><li>Additionally, <i>child rules</i> can be completed with children called <i>path elements</i> using the <b>New Child</b> contextual menu. <i>Path elements</i> defines a path of properties that must be used from the <i>origin</i> to insert the new <i>element</i> in the model.</li></ul></li><li><i>Palette rules</i><ul><li><i>element</i> represents a pattern to match for the identifier of a palette element.</li></ul></li></ul><p>As an example, it is possible to define a diagram of the inner classes of classes as follow:</p><p><img border="0" src="captures/config_sample.png"/></p><p>In this example, the sole <i>model rule</i> defines that this kind of diagram can only be applied on <b>Class</b>.
+The <i>owning rules</i> define that the diagrams can be owned only by <b>Class</b> and <b>Package</b> elements.
+Then two <i>child rules</i> are used to define that it is only possible to add new <b>Classifier</b> and <b>Comment</b> elements thorugh this diagram.
+The first <i>child rule</i> specifies that the <b>Classifier</b> elements should be added to the model with the <b>nestedClassifier</b> property of the root <b>Class</b> element.
+In the same way, the second one specifies that the <b>Comment</b> elements should be added to the model with the <b>ownedComment</b> property of the root <b>Class</b> element.</p><h4 id="Viewpoint_Enforcement_Principles">Viewpoint Enforcement Principles</h4><p>When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions:</p><ul><li>If the selected viewpoint does not enable to decide for the action at hand (no mathcing diagram), the parent viewpoints are recursively considered.</li><li>If a diagram is matched, but the defined rules do not enable to decide for the action at hand, then the parent diagrams are recursively considered.</li><li>The rules are considered in the order of their definition in the viewpoints configuration editor.</li><li>The first rule to match the condition (e.g. type of the considered model element) is used to decide upon the user action. Subsequent rules are not considered. Parent diagrams/viewpoints are also not considered.</li></ul></body></html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki
new file mode 100755
index 00000000000..ed0d4705d75
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.doc/resources/viewpoints.mediawiki
@@ -0,0 +1,240 @@
+<!--
+ 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:
+ Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+-->
+
+=Viewpoints in Papyrus=
+
+==Introduction==
+Viewpoints in Papyrus enables the specialization of the user experiences by constraining what can be seen and interacted with in models through views.
+The most obvious ways to look at and interact with a model is through diagrams; and viewpoints enables the specification of constraints upon them as well as their specialization.
+Papyrus also define additional views, including textual ones.
+
+
+
+
+==Impacts of Viewpoints in the Papyrus Interface==
+The enforcement of a particular viewpoint will have noticeable consequences on the user interface of Papyrus, i.e. what a user will be able to see and do.
+Viewpoints also have impacts on the edition experience of the model themselves.
+
+===Contextual Menus===
+The definition a viewpoints specify which views and diagrams can be applied to specified model elements.
+A consequence is that the Papyrus tool bar as well as the contextual menus are aware of the currently enforced viewpoint and only make available actions that are in conformance with the viewpoint.
+For example, in the two captures hereafter the content of the same menu for the creation of a new diagram depends on the enforced viewpoint.
+{|
+| [[image:captures/menu_normal.png]]
+| [[image:captures/menu_filtered.png]]
+|}
+
+===Toolbar Elements===
+The toolbar elements for the creation of new diagrams are also adapted in the same way as the contextual menus to reflect the currently enforced viewpoint.
+The elements that appeat in the contextual menus should also appear in the toolbar.
+
+===Diagram Properties===
+Papyrus views and diagrams have a set of properties related to the management of viewpoints.
+They are visible in the '''Properties''' view of the diagrams.
+
+[[image:captures/properties.png]]
+
+In the image above the selected diagram have two properties related to the management of viewpoints:
+* '''View Type''': This property shows the diagram's type as defined in the viewpoints' configuration. In the example above, it is a ''UML Activity Diagram'', part of the ''Default Papyrus Viewpoint'' configuration.
+* '''Owner''': This property shows the current owner of the diagram, i.e. the model element which the diagram is attached to. In the example above, the diagram is within the ''Diagrams'' package, meaning this package owns the diagram.
+* '''Root element''': This property shows the model element that is visualized through the diagram. In the example above, the top element visualized in the selected diagram is the UML activity named ''Activity1''. It is possible to retarget a diagram, i.e. change its root element. The user will be prompted to select a model element that fits the constraints that apply for this type of diagram.
+
+
+
+
+==Changing the Applied Viewpoint==
+The Papyrus viewpoints can be configured in a preference panel accessible along the other Papyrus preferences under the name '''Viewpoints Configuration'''.
+The panel looks like the following:
+
+[[image:captures/preferences.png]]
+
+===Configuration Kinds===
+The first preference element is the selection of the kind of configuration to apply to the user's environment.
+In the above capture, the radio buttons are used to determine which kind of configuration to use.
+Papyrus comes with two built-in configurations.
+It is nevertheless possible to define new configurations and viewpoints, and select them in this position.
+
+====Built-in Configurations====
+The built-in configurations are provided for convenience and have the following properties:
+* ''Any number of diagrams per model element'' is a configuration with a viewpoint that allow any kind of view and diagram and does not restrain the number of diagrams that can be created for each model element.
+* ''At most one diagram per model element'' is a configuration with a viewpoint that allow any kind of view and diagram but limit the number of diagrams that can be created for each model element at one.
+
+====Extension Point-Defined Configuration====
+It is possible to deploy custom viewpoints configuration through an Eclipse plugin and its contribution to an extension point.
+The identifier of the extension point to use is ''org.eclipse.papyrus.infra.viewpoints.policy.custom'' and is defined in the ''org.eclipse.papyrus.infra.viewpoints.policy'' plugin.
+Each extension can contribute a viewpoints configuration and give it a priority (0 is lowest).
+The setting of the contributed configuration is achieved by giving the path to the configuration file.
+The path can be relative to the contributing plugin's root, or be an absolute URI in the form of ''platform:/plugin/<pluginID>/<path>''.
+If no contribution is made and this option is selected, the builtin configuration named ''Any number of diagrams per model element'' will be used as a fallback.
+
+====Custom Configuration====
+To select a custom configuration, choose the ''Custom'' option.
+This will activate the corresponding preferences fields:
+* ''Access scheme'' lets the user select how the custom configuration should be looked for. The possible options are:
+** ''Absolute path'' means that the configuration will be looked for on the host's file system.
+** ''Workspace file'' means that the configuration file will be looked for as a resource in the workspace.
+** ''Embedded in a plugin'' means that the configuration file will be looked for as a resource in a loaded Eclipse plugin.
+
+* ''Path'' lets the user select the configuration file based on the selected scheme:
+** Using the scheme ''Absolute path'' the file is selected using a simple file selection dialog.
+** Using the scheme ''Workspace file'' the file is selected using a workspace resource selection dialog.
+** Using the scheme ''Embedded in a plugin'' the file is selected using a plugin content selection dialog.
+
+===Stakeholder and Viewpoint Selection===
+Once a configuration is selected, the use can select one of the viewpoint defined within it.
+This is achieved through the two dropdown boxes:
+* ''Stakeholder'' is used to select the user's archetype
+* ''Viewpoint'' is used to select the viewpoint
+
+
+
+
+==Defining New Viewpoints==
+Papyrus supports the definition of new viewpoints that can subsequently used by selecting them in the Papyrus Viewpoints preferences panel.
+A configuration file is simply an Ecore model that can be edited with the provided Viewpoints configuration editor in Papyrus.
+
+===Available Concepts===
+This subsection summarizes the different concepts that are leveraged for the definition of viewpoints in Papyrus.
+It is important to note that these concepts rely on and extend the ISO 42010 standard for viewpoints.
+
+* A ''configuration'' is a specification of a set of ''viewpoints'' and ''stakeholders''. A ''configuration'' is typically stored in a .configuration file and has to be selected in the preference window (Window/Preferences/Papyrus/Viewpoints Configuration).
+* The concept of ''stakeholder'' (see ISO 42010) in Papyrus represents a user archetype that pertains in the construction and/or review of a model. A ''stakeholder'' is associated to a set of ''viewpoints'' defining how he/she can see a model.
+* The concept of ''viewpoint'' (see ISO 42010) in Papyrus represents a set of constrains about what can be seen in a model. A Papyrus ''viewpoint'' mainly defines what are the accessible ''diagrams'' and the particular constraints to be applied on each of them.
+* A Papyrus ''diagram'' is a specialized view on a model in the form of a visual language. It is supported by an implementation artifact, i.e. the actual code that implements the diagram. Moreover, it can be constrained using ''rules''.
+* A ''model rule'' specifies if a model element can be represented through a ''diagram'', i.e. whether it can be selected as the root element of a ''diagram''.
+* An ''owning rule'' specifies whether a model element is allowed to own a ''diagram''.
+* ''Child rules'' specify whether a given model element can be added to the model through a ''diagram''.
+* ''Palette rules'' specify the palette elements that are visible for a ''diagram''.
+
+===Building a Configuration===
+The first step is to create the configuration file.
+Papyrus comes with a wizard for this purpose:
+* In the contextual menu of a project, or in the Eclipse '''File'' menu, select '''New''', '''Other ...'''.
+* The wizard is called '''Viewpoints configuration''' and is located in the '''Papyrus''' category.
+
+====Configuration element====
+Once the configuration file is created, it should be automatically opened with the Papyrus viewpoints configuration editor.
+The top element is the ''configuration''.
+It has two properties:
+* ''Default Stakeholder'', which should be used to select the default stakeholder for this configuration (once one has been created).
+* ''Metamodel'', which should be used to select the metamodel on which the viewpoint will apply. The property field proposes a list of the loaded metamodels identified by their URI. Usually, the UML metamodel (http://www.eclipse.org/uml2/4.0.0/UML/) should be used.
+
+====Stakeholders and Viewpoints====
+It is then possible to add new ''Viewpoints'' and ''Stakeholders'' to the configuration by the conxtual menu '''New Child''' on the configuration element.
+A ''stakeholder'' has two properties, ''name''' and ''viewpoints''. The ''viewpoints'' properties must be filled with references to the appropriate viewpoints for the ''stakeholder''.
+A ''viewpoint'' also has two properties, ''name'' and ''parent''. The ''parent'' property is used to specify that a ''viewpoint'' inherits from another one.
+
+====Diagram element====
+Once a viewpoint has been created, it is possible to add to it ''diagrams'' using the '''New Child''' contextual menu.
+A ''diagram'' will define a specialized view on a model, based on the implementation in Papyrus.
+For this purpose, the ''diagram'' elements have the following properties:
+* ''name'', which specifies a descriptor for the diagram
+* ''parent'', which enables the declaration of an inheritance relationship with another diagram
+* ''implementation ID'', which is the unique identifier of the software component in papyrus that will effectively implements the diagram
+* ''profiles'', which is the set of profiles that need to be applied for this diagram. The profiles can be selected through their metamodel identified by their URI. This implies that the profiles must be loaded at this point.
+
+The list of recognized implementation IDs is as follow:
+{| border="solid 1px grey"
+! Implementation ID
+! Description
+|-
+| '''PapyrusUMLActivityDiagram'''
+| UML Activity Diagram
+|-
+| '''PapyrusUMLClassDiagram'''
+| UML Class Diagram
+|-
+| '''PapyrusUMLCommunicationDiagram'''
+| UML Communication Diagram
+|-
+| '''PapyrusUMLComponentDiagram'''
+| UML Component Diagram
+|-
+| '''CompositeStructure'''
+| UML Composite Diagram
+|-
+| '''PapyrusUMLDeploymentDiagram'''
+| UML Deployment Diagram
+|-
+| '''PapyrusUMLProfileDiagram'''
+| UML Profile Diagram
+|-
+| '''PapyrusUMLSequenceDiagram'''
+| UML Sequence Diagram
+|-
+| '''PapyrusUMLStateMachineDiagram'''
+| UML State Machine Diagram
+|-
+| '''PapyrusUMLTimingDiagram'''
+| UML Timing Diagram
+|-
+| '''UseCase'''
+| UML Use Case Diagram
+|-
+| '''PapyrusUMLInteractionOverviewDiagram'''
+| UML Interaction Overview Diagram
+|-
+| '''BlockDefinition'''
+| SysML Block Definition Diagram
+|-
+| '''InternalBlock'''
+| SysML Internal Block Diagram
+|-
+| '''Parametric'''
+| SysML Parametric Diagram
+|-
+| '''RequirementDiagram'''
+| SysML Requirements Diagram
+|}
+
+Once a diagram has been created it is possible to constraint it using rules.
+There are four kinds of rules:
+* ''Model rules'' constrain the type of the (root) model elements that can be visualized through this view.
+* ''Owning rules'' constrain the type of the model elements that can own the diagram itself.
+* ''Child rules'' constrain the type of the model elements that can be dropped within this diagram.
+* ''Palette rules'' constrain the display of the diagram's palette elements.
+Each rule has a ''permit'' property that specify whether the rule authorizes or forbids the action it represents.
+Otherwise, the properties of the rules are as follow:
+* ''Model rules''
+** ''element'' represents the type of the model elements to apply the rule on.
+** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.
+** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram.
+* ''Owning rules''
+** ''element'' represents the type of the model elements to apply the rule on.
+** ''multiplicity'' represents the maximum number of this kind of diagram that can be created for the referenced model element. -1 represents an unbounded number.
+** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram.
+* ''Child rules''
+** ''element'' represents the type of the model elements begin dropped.
+** ''stereotypes'' represents the set of stereotypes that must be applied in the model element for the rule to match. The stereotypes can be picked from the classifiers of the ''profiles'' defined in the parent diagram.
+** ''origin'' represents the type of the model elements that are the target of the drop. It is usually one of the type defined in the ''model rules''.
+** Additionally, ''child rules'' can be completed with children called ''path elements'' using the '''New Child''' contextual menu. ''Path elements'' defines a path of properties that must be used from the ''origin'' to insert the new ''element'' in the model.
+* ''Palette rules''
+** ''element'' represents a pattern to match for the identifier of a palette element.
+
+As an example, it is possible to define a diagram of the inner classes of classes as follow:
+
+[[image:captures/config_sample.png]]
+
+In this example, the sole ''model rule'' defines that this kind of diagram can only be applied on '''Class'''.
+The ''owning rules'' define that the diagrams can be owned only by '''Class''' and '''Package''' elements.
+Then two ''child rules'' are used to define that it is only possible to add new '''Classifier''' and '''Comment''' elements thorugh this diagram.
+The first ''child rule'' specifies that the '''Classifier''' elements should be added to the model with the '''nestedClassifier''' property of the root '''Class''' element.
+In the same way, the second one specifies that the '''Comment''' elements should be added to the model with the '''ownedComment''' property of the root '''Class''' element.
+
+
+
+
+====Viewpoint Enforcement Principles====
+When enforcing a viewpoint, the following principles are used when authorizing, or denying user actions:
+* If the selected viewpoint does not enable to decide for the action at hand (no mathcing diagram), the parent viewpoints are recursively considered.
+* If a diagram is matched, but the defined rules do not enable to decide for the action at hand, then the parent diagrams are recursively considered.
+* The rules are considered in the order of their definition in the viewpoints configuration editor.
+* The first rule to match the condition (e.g. type of the considered model element) is used to decide upon the user action. Subsequent rules are not considered. Parent diagrams/viewpoints are also not considered. \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.classpath
index 1bdc2a0ba05..2d1a4302f04 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/.classpath
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.classpath
@@ -1,7 +1,7 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.project
new file mode 100755
index 00000000000..3a171fbc9e7
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.iso42010.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..7e611024bda
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.iso42010.edit;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.iso42010.provider.Iso42010EditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.viewpoints.iso42010.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0";visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/about.html
new file mode 100755
index 00000000000..dd02e0be168
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/build.properties
new file mode 100755
index 00000000000..9811208ae02
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/build.properties
@@ -0,0 +1,12 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_concerns_Concern.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_concerns_Concern.gif
new file mode 100755
index 00000000000..47ec394ad6b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_concerns_Concern.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_correspondences_Correspondence.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_correspondences_Correspondence.gif
new file mode 100755
index 00000000000..dfe521b7dc1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_correspondences_Correspondence.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_decisions_ArchitectureDecision.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_decisions_ArchitectureDecision.gif
new file mode 100755
index 00000000000..acf9c16a0fd
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_decisions_ArchitectureDecision.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_expresses_Architecture.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_expresses_Architecture.gif
new file mode 100755
index 00000000000..c0d8f24198b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_expresses_Architecture.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rationales_ArchitectureRationale.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rationales_ArchitectureRationale.gif
new file mode 100755
index 00000000000..dfe521b7dc1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rationales_ArchitectureRationale.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rules_CorrespondenceRule.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rules_CorrespondenceRule.gif
new file mode 100755
index 00000000000..6247d4144af
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_rules_CorrespondenceRule.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_stakeholders_Stakeholder.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_stakeholders_Stakeholder.png
new file mode 100755
index 00000000000..4f334bdbf89
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_stakeholders_Stakeholder.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_system_System.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_system_System.gif
new file mode 100755
index 00000000000..d839c758a4c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_system_System.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_viewpoints_ArchitectureViewpoint.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_viewpoints_ArchitectureViewpoint.gif
new file mode 100755
index 00000000000..048f1ac2406
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_viewpoints_ArchitectureViewpoint.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_views_ArchitectureView.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_views_ArchitectureView.gif
new file mode 100755
index 00000000000..63666342b38
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureDescription_views_ArchitectureView.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_concerns_Concern.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_concerns_Concern.gif
new file mode 100755
index 00000000000..8f218cb68af
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_concerns_Concern.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_rules_CorrespondenceRule.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_rules_CorrespondenceRule.gif
new file mode 100755
index 00000000000..e2efc630b97
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_rules_CorrespondenceRule.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_stakeholders_Stakeholder.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_stakeholders_Stakeholder.png
new file mode 100755
index 00000000000..4f334bdbf89
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_stakeholders_Stakeholder.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_viewpoints_ArchitectureViewpoint.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_viewpoints_ArchitectureViewpoint.gif
new file mode 100755
index 00000000000..0e886ecf2b8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureFramework_viewpoints_ArchitectureViewpoint.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureView_models_ArchitectureModel.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureView_models_ArchitectureModel.gif
new file mode 100755
index 00000000000..753b7fa3328
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureView_models_ArchitectureModel.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureViewpoint_modelKinds_ModelKind.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureViewpoint_modelKinds_ModelKind.gif
new file mode 100755
index 00000000000..e9c7cf5ac0f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/ctool16/CreateArchitectureViewpoint_modelKinds_ModelKind.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Architecture.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Architecture.gif
new file mode 100755
index 00000000000..739ebbfa6ac
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Architecture.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDecision.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDecision.gif
new file mode 100755
index 00000000000..14af8aaee9f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDecision.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDescription.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDescription.gif
new file mode 100755
index 00000000000..94c953e013b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureDescription.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureFramework.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureFramework.gif
new file mode 100755
index 00000000000..53500daf98e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureFramework.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureModel.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureModel.gif
new file mode 100755
index 00000000000..10d222998af
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureModel.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureRationale.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureRationale.gif
new file mode 100755
index 00000000000..c4a8af41844
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureRationale.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureView.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureView.gif
new file mode 100755
index 00000000000..904159880b3
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureView.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureViewpoint.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureViewpoint.gif
new file mode 100755
index 00000000000..8a5c70cbd74
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ArchitectureViewpoint.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Concern.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Concern.gif
new file mode 100755
index 00000000000..9250fecbffd
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Concern.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Correspondence.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Correspondence.gif
new file mode 100755
index 00000000000..c4a8af41844
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Correspondence.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/CorrespondenceRule.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/CorrespondenceRule.gif
new file mode 100755
index 00000000000..33854e98c25
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/CorrespondenceRule.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ModelKind.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ModelKind.gif
new file mode 100755
index 00000000000..7b7c428c715
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/ModelKind.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Stakeholder.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Stakeholder.png
new file mode 100755
index 00000000000..ce2ac2d97eb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/Stakeholder.png
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/System.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/System.gif
new file mode 100755
index 00000000000..89ad5da38ab
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/icons/full/obj16/System.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.properties
new file mode 100755
index 00000000000..5e089b58e63
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.properties
@@ -0,0 +1,95 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus ISO42010 Implementation - Edit (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_ADElement_type = AD Element
+_UI_ArchitectureDescription_type = Architecture Description
+_UI_Stakeholder_type = Stakeholder
+_UI_ArchitectureViewpoint_type = Architecture Viewpoint
+_UI_ModelKind_type = Model Kind
+_UI_ArchitectureModel_type = Architecture Model
+_UI_ArchitectureView_type = Architecture View
+_UI_Concern_type = Concern
+_UI_System_type = System
+_UI_Architecture_type = Architecture
+_UI_ArchitectureRationale_type = Architecture Rationale
+_UI_Correspondence_type = Correspondence
+_UI_CorrespondenceRule_type = Correspondence Rule
+_UI_ArchitectureDecision_type = Architecture Decision
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_ADElement_name_feature = Name
+_UI_ADElement_affectedBy_feature = Affected By
+_UI_ArchitectureDescription_stakeholders_feature = Stakeholders
+_UI_ArchitectureDescription_concerns_feature = Concerns
+_UI_ArchitectureDescription_viewpoints_feature = Viewpoints
+_UI_ArchitectureDescription_views_feature = Views
+_UI_ArchitectureDescription_system_feature = System
+_UI_ArchitectureDescription_expresses_feature = Expresses
+_UI_ArchitectureDescription_rationales_feature = Rationales
+_UI_ArchitectureDescription_correspondences_feature = Correspondences
+_UI_ArchitectureDescription_rules_feature = Rules
+_UI_ArchitectureDescription_decisions_feature = Decisions
+_UI_Stakeholder_concerns_feature = Concerns
+_UI_Stakeholder_viewpoints_feature = Viewpoints
+_UI_Stakeholder_hasInterestIn_feature = Has Interest In
+_UI_ArchitectureViewpoint_modelKinds_feature = Model Kinds
+_UI_ArchitectureViewpoint_governs_feature = Governs
+_UI_ArchitectureViewpoint_frames_feature = Frames
+_UI_ModelKind_governs_feature = Governs
+_UI_ModelKind_viewpoint_feature = Viewpoint
+_UI_ArchitectureModel_governedBy_feature = Governed By
+_UI_ArchitectureModel_view_feature = View
+_UI_ArchitectureView_governedBy_feature = Governed By
+_UI_ArchitectureView_models_feature = Models
+_UI_ArchitectureView_addresses_feature = Addresses
+_UI_Concern_framedBy_feature = Framed By
+_UI_Concern_addressedBy_feature = Addressed By
+_UI_Concern_stakeholders_feature = Stakeholders
+_UI_Concern_raisedBy_feature = Raised By
+_UI_Concern_decisions_feature = Decisions
+_UI_System_name_feature = Name
+_UI_System_stakeholders_feature = Stakeholders
+_UI_System_exhibits_feature = Exhibits
+_UI_Architecture_exhibitedIn_feature = Exhibited In
+_UI_ArchitectureRationale_justifies_feature = Justifies
+_UI_Correspondence_governedBy_feature = Governed By
+_UI_Correspondence_relates_feature = Relates
+_UI_CorrespondenceRule_governs_feature = Governs
+_UI_ArchitectureDecision_justifiedBy_feature = Justified By
+_UI_ArchitectureDecision_dependsUpon_feature = Depends Upon
+_UI_ArchitectureDecision_dependents_feature = Dependents
+_UI_ArchitectureDecision_raises_feature = Raises
+_UI_ArchitectureDecision_pertainsTo_feature = Pertains To
+_UI_ArchitectureDecision_affects_feature = Affects
+_UI_Unknown_feature = Unspecified
+
+_UI_ArchitectureFramework_type = Architecture Framework
+_UI_ArchitectureFramework_stakeholders_feature = Stakeholders
+_UI_ArchitectureFramework_viewpoints_feature = Viewpoints
+_UI_ArchitectureFramework_rules_feature = Rules
+_UI_ArchitectureFramework_concerns_feature = Concerns
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.xml
new file mode 100755
index 00000000000..e5d807fa495
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated iso42010 -->
+ <factory
+ uri="http://www.eclipse.org/papyrus/infra/viewpoints/iso42010"
+ class="org.eclipse.papyrus.infra.viewpoints.iso42010.provider.Iso42010ItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ADElementItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ADElementItemProvider.java
new file mode 100755
index 00000000000..87050ac755b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ADElementItemProvider.java
@@ -0,0 +1,180 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ADElementItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ADElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addAffectedByPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ADElement_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ADElement_name_feature", "_UI_ADElement_type"),
+ Iso42010Package.Literals.AD_ELEMENT__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Affected By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAffectedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ADElement_affectedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ADElement_affectedBy_feature", "_UI_ADElement_type"),
+ Iso42010Package.Literals.AD_ELEMENT__AFFECTED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ADElement)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ADElement_type") :
+ getString("_UI_ADElement_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ADElement.class)) {
+ case Iso42010Package.AD_ELEMENT__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDecisionItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDecisionItemProvider.java
new file mode 100755
index 00000000000..ddcc6e95c73
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDecisionItemProvider.java
@@ -0,0 +1,261 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureDecisionItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureDecisionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addJustifiedByPropertyDescriptor(object);
+ addDependsUponPropertyDescriptor(object);
+ addDependentsPropertyDescriptor(object);
+ addRaisesPropertyDescriptor(object);
+ addPertainsToPropertyDescriptor(object);
+ addAffectsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Justified By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addJustifiedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_justifiedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_justifiedBy_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__JUSTIFIED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Depends Upon feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDependsUponPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_dependsUpon_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_dependsUpon_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__DEPENDS_UPON,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Dependents feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDependentsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_dependents_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_dependents_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__DEPENDENTS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Raises feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRaisesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_raises_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_raises_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__RAISES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Pertains To feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addPertainsToPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_pertainsTo_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_pertainsTo_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__PERTAINS_TO,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Affects feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAffectsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureDecision_affects_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureDecision_affects_feature", "_UI_ArchitectureDecision_type"),
+ Iso42010Package.Literals.ARCHITECTURE_DECISION__AFFECTS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ArchitectureDecision.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureDecision"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ArchitectureDecision)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ArchitectureDecision_type") :
+ getString("_UI_ArchitectureDecision_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDescriptionItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDescriptionItemProvider.java
new file mode 100755
index 00000000000..659ba79aeae
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureDescriptionItemProvider.java
@@ -0,0 +1,241 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureDescriptionItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureDescriptionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__CONCERNS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWPOINTS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__SYSTEM);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__EXPRESSES);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__RATIONALES);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__RULES);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__DECISIONS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ArchitectureDescription.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureDescription"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ArchitectureDescription_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ArchitectureDescription.class)) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS,
+ Iso42010Factory.eINSTANCE.createStakeholder()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__CONCERNS,
+ Iso42010Factory.eINSTANCE.createConcern()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWPOINTS,
+ Iso42010Factory.eINSTANCE.createArchitectureViewpoint()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWS,
+ Iso42010Factory.eINSTANCE.createArchitectureView()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__SYSTEM,
+ Iso42010Factory.eINSTANCE.createSystem()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__EXPRESSES,
+ Iso42010Factory.eINSTANCE.createArchitecture()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__RATIONALES,
+ Iso42010Factory.eINSTANCE.createArchitectureRationale()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES,
+ Iso42010Factory.eINSTANCE.createCorrespondence()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__RULES,
+ Iso42010Factory.eINSTANCE.createCorrespondenceRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__DECISIONS,
+ Iso42010Factory.eINSTANCE.createArchitectureDecision()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureFrameworkItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureFrameworkItemProvider.java
new file mode 100755
index 00000000000..d32f549e3e7
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureFrameworkItemProvider.java
@@ -0,0 +1,199 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureFrameworkItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureFrameworkItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__RULES);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__CONCERNS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ArchitectureFramework.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureFramework"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ArchitectureFramework_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ArchitectureFramework.class)) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS,
+ Iso42010Factory.eINSTANCE.createStakeholder()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
+ Iso42010Factory.eINSTANCE.createArchitectureViewpoint()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__RULES,
+ Iso42010Factory.eINSTANCE.createCorrespondenceRule()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__CONCERNS,
+ Iso42010Factory.eINSTANCE.createConcern()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureItemProvider.java
new file mode 100755
index 00000000000..24e89c3dc7e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureItemProvider.java
@@ -0,0 +1,156 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addExhibitedInPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Exhibited In feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExhibitedInPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Architecture_exhibitedIn_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Architecture_exhibitedIn_feature", "_UI_Architecture_type"),
+ Iso42010Package.Literals.ARCHITECTURE__EXHIBITED_IN,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Architecture.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Architecture"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Architecture_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureModelItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureModelItemProvider.java
new file mode 100755
index 00000000000..a546dfcd8a6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureModelItemProvider.java
@@ -0,0 +1,146 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureModelItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureModelItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernedByPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governed By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureModel_governedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureModel_governedBy_feature", "_UI_ArchitectureModel_type"),
+ Iso42010Package.Literals.ARCHITECTURE_MODEL__GOVERNED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ArchitectureModel.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureModel"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ArchitectureModel)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ArchitectureModel_type") :
+ getString("_UI_ArchitectureModel_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureRationaleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureRationaleItemProvider.java
new file mode 100755
index 00000000000..237f502d187
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureRationaleItemProvider.java
@@ -0,0 +1,146 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureRationaleItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureRationaleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addJustifiesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Justifies feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addJustifiesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureRationale_justifies_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureRationale_justifies_feature", "_UI_ArchitectureRationale_type"),
+ Iso42010Package.Literals.ARCHITECTURE_RATIONALE__JUSTIFIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ArchitectureRationale.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureRationale"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ArchitectureRationale)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ArchitectureRationale_type") :
+ getString("_UI_ArchitectureRationale_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewItemProvider.java
new file mode 100755
index 00000000000..3cd97ab6577
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewItemProvider.java
@@ -0,0 +1,214 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureViewItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernedByPropertyDescriptor(object);
+ addAddressesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governed By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureView_governedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureView_governedBy_feature", "_UI_ArchitectureView_type"),
+ Iso42010Package.Literals.ARCHITECTURE_VIEW__GOVERNED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Addresses feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAddressesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureView_addresses_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureView_addresses_feature", "_UI_ArchitectureView_type"),
+ Iso42010Package.Literals.ARCHITECTURE_VIEW__ADDRESSES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_VIEW__MODELS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ArchitectureView.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureView"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ArchitectureView)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ArchitectureView_type") :
+ getString("_UI_ArchitectureView_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ArchitectureView.class)) {
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_VIEW__MODELS,
+ Iso42010Factory.eINSTANCE.createArchitectureModel()));
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewpointItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewpointItemProvider.java
new file mode 100755
index 00000000000..f02e5275752
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ArchitectureViewpointItemProvider.java
@@ -0,0 +1,214 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ArchitectureViewpointItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernsPropertyDescriptor(object);
+ addFramesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governs feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureViewpoint_governs_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureViewpoint_governs_feature", "_UI_ArchitectureViewpoint_type"),
+ Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__GOVERNS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Frames feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFramesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ArchitectureViewpoint_frames_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ArchitectureViewpoint_frames_feature", "_UI_ArchitectureViewpoint_type"),
+ Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__FRAMES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ArchitectureViewpoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ArchitectureViewpoint"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ArchitectureViewpoint)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ArchitectureViewpoint_type") :
+ getString("_UI_ArchitectureViewpoint_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ArchitectureViewpoint.class)) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ Iso42010Factory.eINSTANCE.createModelKind()));
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ConcernItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ConcernItemProvider.java
new file mode 100755
index 00000000000..f7ce5594340
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ConcernItemProvider.java
@@ -0,0 +1,238 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConcernItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConcernItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFramedByPropertyDescriptor(object);
+ addAddressedByPropertyDescriptor(object);
+ addStakeholdersPropertyDescriptor(object);
+ addRaisedByPropertyDescriptor(object);
+ addDecisionsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Framed By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFramedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Concern_framedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Concern_framedBy_feature", "_UI_Concern_type"),
+ Iso42010Package.Literals.CONCERN__FRAMED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Addressed By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAddressedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Concern_addressedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Concern_addressedBy_feature", "_UI_Concern_type"),
+ Iso42010Package.Literals.CONCERN__ADDRESSED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Stakeholders feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStakeholdersPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Concern_stakeholders_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Concern_stakeholders_feature", "_UI_Concern_type"),
+ Iso42010Package.Literals.CONCERN__STAKEHOLDERS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Raised By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRaisedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Concern_raisedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Concern_raisedBy_feature", "_UI_Concern_type"),
+ Iso42010Package.Literals.CONCERN__RAISED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Decisions feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDecisionsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Concern_decisions_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Concern_decisions_feature", "_UI_Concern_type"),
+ Iso42010Package.Literals.CONCERN__DECISIONS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Concern.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Concern"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Concern)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Concern_type") :
+ getString("_UI_Concern_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceItemProvider.java
new file mode 100755
index 00000000000..7f9c7c3398f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceItemProvider.java
@@ -0,0 +1,179 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CorrespondenceItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CorrespondenceItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernedByPropertyDescriptor(object);
+ addRelatesPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governed By feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernedByPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Correspondence_governedBy_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Correspondence_governedBy_feature", "_UI_Correspondence_type"),
+ Iso42010Package.Literals.CORRESPONDENCE__GOVERNED_BY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Relates feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addRelatesPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Correspondence_relates_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Correspondence_relates_feature", "_UI_Correspondence_type"),
+ Iso42010Package.Literals.CORRESPONDENCE__RELATES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Correspondence.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Correspondence"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_Correspondence_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceRuleItemProvider.java
new file mode 100755
index 00000000000..03c71723f9b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/CorrespondenceRuleItemProvider.java
@@ -0,0 +1,156 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CorrespondenceRuleItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CorrespondenceRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governs feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_CorrespondenceRule_governs_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_CorrespondenceRule_governs_feature", "_UI_CorrespondenceRule_type"),
+ Iso42010Package.Literals.CORRESPONDENCE_RULE__GOVERNS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns CorrespondenceRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CorrespondenceRule"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_CorrespondenceRule_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010EditPlugin.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010EditPlugin.java
new file mode 100755
index 00000000000..762451dfa73
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010EditPlugin.java
@@ -0,0 +1,100 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Iso42010 edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class Iso42010EditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final Iso42010EditPlugin INSTANCE = new Iso42010EditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010EditPlugin() {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010ItemProviderAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010ItemProviderAdapterFactory.java
new file mode 100755
index 00000000000..09a5e7127ac
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/Iso42010ItemProviderAdapterFactory.java
@@ -0,0 +1,522 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.util.Iso42010AdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Iso42010ItemProviderAdapterFactory extends Iso42010AdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010ItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureDescriptionItemProvider architectureDescriptionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureDescriptionAdapter() {
+ if (architectureDescriptionItemProvider == null) {
+ architectureDescriptionItemProvider = new ArchitectureDescriptionItemProvider(this);
+ }
+
+ return architectureDescriptionItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StakeholderItemProvider stakeholderItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createStakeholderAdapter() {
+ if (stakeholderItemProvider == null) {
+ stakeholderItemProvider = new StakeholderItemProvider(this);
+ }
+
+ return stakeholderItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureViewpointItemProvider architectureViewpointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureViewpointAdapter() {
+ if (architectureViewpointItemProvider == null) {
+ architectureViewpointItemProvider = new ArchitectureViewpointItemProvider(this);
+ }
+
+ return architectureViewpointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelKindItemProvider modelKindItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createModelKindAdapter() {
+ if (modelKindItemProvider == null) {
+ modelKindItemProvider = new ModelKindItemProvider(this);
+ }
+
+ return modelKindItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureModelItemProvider architectureModelItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureModelAdapter() {
+ if (architectureModelItemProvider == null) {
+ architectureModelItemProvider = new ArchitectureModelItemProvider(this);
+ }
+
+ return architectureModelItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureViewItemProvider architectureViewItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureViewAdapter() {
+ if (architectureViewItemProvider == null) {
+ architectureViewItemProvider = new ArchitectureViewItemProvider(this);
+ }
+
+ return architectureViewItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConcernItemProvider concernItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createConcernAdapter() {
+ if (concernItemProvider == null) {
+ concernItemProvider = new ConcernItemProvider(this);
+ }
+
+ return concernItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.System} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SystemItemProvider systemItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.System}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createSystemAdapter() {
+ if (systemItemProvider == null) {
+ systemItemProvider = new SystemItemProvider(this);
+ }
+
+ return systemItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureItemProvider architectureItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureAdapter() {
+ if (architectureItemProvider == null) {
+ architectureItemProvider = new ArchitectureItemProvider(this);
+ }
+
+ return architectureItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureRationaleItemProvider architectureRationaleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureRationaleAdapter() {
+ if (architectureRationaleItemProvider == null) {
+ architectureRationaleItemProvider = new ArchitectureRationaleItemProvider(this);
+ }
+
+ return architectureRationaleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CorrespondenceItemProvider correspondenceItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCorrespondenceAdapter() {
+ if (correspondenceItemProvider == null) {
+ correspondenceItemProvider = new CorrespondenceItemProvider(this);
+ }
+
+ return correspondenceItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CorrespondenceRuleItemProvider correspondenceRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCorrespondenceRuleAdapter() {
+ if (correspondenceRuleItemProvider == null) {
+ correspondenceRuleItemProvider = new CorrespondenceRuleItemProvider(this);
+ }
+
+ return correspondenceRuleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureDecisionItemProvider architectureDecisionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureDecisionAdapter() {
+ if (architectureDecisionItemProvider == null) {
+ architectureDecisionItemProvider = new ArchitectureDecisionItemProvider(this);
+ }
+
+ return architectureDecisionItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureFrameworkItemProvider architectureFrameworkItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createArchitectureFrameworkAdapter() {
+ if (architectureFrameworkItemProvider == null) {
+ architectureFrameworkItemProvider = new ArchitectureFrameworkItemProvider(this);
+ }
+
+ return architectureFrameworkItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (architectureDescriptionItemProvider != null) architectureDescriptionItemProvider.dispose();
+ if (stakeholderItemProvider != null) stakeholderItemProvider.dispose();
+ if (architectureViewpointItemProvider != null) architectureViewpointItemProvider.dispose();
+ if (modelKindItemProvider != null) modelKindItemProvider.dispose();
+ if (architectureModelItemProvider != null) architectureModelItemProvider.dispose();
+ if (architectureViewItemProvider != null) architectureViewItemProvider.dispose();
+ if (concernItemProvider != null) concernItemProvider.dispose();
+ if (systemItemProvider != null) systemItemProvider.dispose();
+ if (architectureItemProvider != null) architectureItemProvider.dispose();
+ if (architectureRationaleItemProvider != null) architectureRationaleItemProvider.dispose();
+ if (correspondenceItemProvider != null) correspondenceItemProvider.dispose();
+ if (correspondenceRuleItemProvider != null) correspondenceRuleItemProvider.dispose();
+ if (architectureDecisionItemProvider != null) architectureDecisionItemProvider.dispose();
+ if (architectureFrameworkItemProvider != null) architectureFrameworkItemProvider.dispose();
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ModelKindItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ModelKindItemProvider.java
new file mode 100755
index 00000000000..7941e7b4e35
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/ModelKindItemProvider.java
@@ -0,0 +1,146 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ModelKindItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelKindItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addGovernsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Governs feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addGovernsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelKind_governs_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelKind_governs_feature", "_UI_ModelKind_type"),
+ Iso42010Package.Literals.MODEL_KIND__GOVERNS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ModelKind.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ModelKind"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ModelKind)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ModelKind_type") :
+ getString("_UI_ModelKind_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/StakeholderItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/StakeholderItemProvider.java
new file mode 100755
index 00000000000..fb65a27f40e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/StakeholderItemProvider.java
@@ -0,0 +1,187 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StakeholderItemProvider
+ extends ADElementItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StakeholderItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addConcernsPropertyDescriptor(object);
+ addViewpointsPropertyDescriptor(object);
+ addHasInterestInPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Concerns feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addConcernsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Stakeholder_concerns_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Stakeholder_concerns_feature", "_UI_Stakeholder_type"),
+ Iso42010Package.Literals.STAKEHOLDER__CONCERNS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Viewpoints feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addViewpointsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Stakeholder_viewpoints_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Stakeholder_viewpoints_feature", "_UI_Stakeholder_type"),
+ Iso42010Package.Literals.STAKEHOLDER__VIEWPOINTS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Has Interest In feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addHasInterestInPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Stakeholder_hasInterestIn_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Stakeholder_hasInterestIn_feature", "_UI_Stakeholder_type"),
+ Iso42010Package.Literals.STAKEHOLDER__HAS_INTEREST_IN,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Stakeholder.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Stakeholder.png"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Stakeholder)object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Stakeholder_type") : label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/SystemItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/SystemItemProvider.java
new file mode 100755
index 00000000000..d708360c2df
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit/src/org/eclipse/papyrus/infra/viewpoints/iso42010/provider/SystemItemProvider.java
@@ -0,0 +1,213 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.iso42010.System} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SystemItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SystemItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ addStakeholdersPropertyDescriptor(object);
+ addExhibitsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_System_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_System_name_feature", "_UI_System_type"),
+ Iso42010Package.Literals.SYSTEM__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Stakeholders feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStakeholdersPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_System_stakeholders_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_System_stakeholders_feature", "_UI_System_type"),
+ Iso42010Package.Literals.SYSTEM__STAKEHOLDERS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Exhibits feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExhibitsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_System_exhibits_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_System_exhibits_feature", "_UI_System_type"),
+ Iso42010Package.Literals.SYSTEM__EXHIBITS,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns System.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/System"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((org.eclipse.papyrus.infra.viewpoints.iso42010.System)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_System_type") :
+ getString("_UI_System_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(org.eclipse.papyrus.infra.viewpoints.iso42010.System.class)) {
+ case Iso42010Package.SYSTEM__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Iso42010EditPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.classpath
new file mode 100755
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.classpath
@@ -0,0 +1,7 @@
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.project
index 93f1bbdb8cc..d7721c0768d 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/.project
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.robotml.diagram.componentdef</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.iso42010</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..b7bf4021550
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.iso42010;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.iso42010.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.infra.viewpoints.iso42010,
+ org.eclipse.papyrus.infra.viewpoints.iso42010.impl,
+ org.eclipse.papyrus.infra.viewpoints.iso42010.util
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/about.html
new file mode 100755
index 00000000000..dd02e0be168
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/build.properties
new file mode 100755
index 00000000000..262cbe39d10
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/build.properties
@@ -0,0 +1,12 @@
+#
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore
new file mode 100755
index 00000000000..81576cdd927
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.ecore
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="iso42010" nsURI="http://www.eclipse.org/papyrus/infra/viewpoints/iso42010"
+ nsPrefix="iso42010">
+ <eClassifiers xsi:type="ecore:EClass" name="ADElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="affectedBy" upperBound="-1"
+ eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/affects"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureDescription">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stakeholders" lowerBound="1"
+ upperBound="-1" eType="#//Stakeholder" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="concerns" lowerBound="1"
+ upperBound="-1" eType="#//Concern" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpoints" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureViewpoint" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="views" lowerBound="1" upperBound="-1"
+ eType="#//ArchitectureView" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="system" lowerBound="1"
+ eType="#//System" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expresses" lowerBound="1"
+ eType="#//Architecture" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rationales" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureRationale" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="correspondences" upperBound="-1"
+ eType="#//Correspondence" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1"
+ eType="#//CorrespondenceRule" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="decisions" upperBound="-1"
+ eType="#//ArchitectureDecision" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Stakeholder" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="concerns" lowerBound="1"
+ upperBound="-1" eType="#//Concern" eOpposite="#//Concern/stakeholders"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpoints" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureViewpoint"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="hasInterestIn" lowerBound="1"
+ eType="#//System" eOpposite="#//System/stakeholders"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureViewpoint" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="modelKinds" lowerBound="1"
+ upperBound="-1" eType="#//ModelKind" containment="true" eOpposite="#//ModelKind/viewpoint"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governs" lowerBound="1"
+ eType="#//ArchitectureView" eOpposite="#//ArchitectureView/governedBy"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="frames" lowerBound="1"
+ upperBound="-1" eType="#//Concern" eOpposite="#//Concern/framedBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ModelKind" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governs" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureModel" eOpposite="#//ArchitectureModel/governedBy"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpoint" lowerBound="1"
+ eType="#//ArchitectureViewpoint" eOpposite="#//ArchitectureViewpoint/modelKinds"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureModel" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governedBy" lowerBound="1"
+ eType="#//ModelKind" eOpposite="#//ModelKind/governs"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="view" lowerBound="1" eType="#//ArchitectureView"
+ eOpposite="#//ArchitectureView/models"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureView" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governedBy" lowerBound="1"
+ eType="#//ArchitectureViewpoint" eOpposite="#//ArchitectureViewpoint/governs"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="models" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureModel" containment="true" eOpposite="#//ArchitectureModel/view"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="addresses" lowerBound="1"
+ upperBound="-1" eType="#//Concern" eOpposite="#//Concern/addressedBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Concern" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="framedBy" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureViewpoint" eOpposite="#//ArchitectureViewpoint/frames"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="addressedBy" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureView" eOpposite="#//ArchitectureView/addresses"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stakeholders" lowerBound="1"
+ upperBound="-1" eType="#//Stakeholder" eOpposite="#//Stakeholder/concerns"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="raisedBy" upperBound="-1"
+ eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/raises"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="decisions" upperBound="-1"
+ eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/pertainsTo"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="System">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stakeholders" lowerBound="1"
+ upperBound="-1" eType="#//Stakeholder" eOpposite="#//Stakeholder/hasInterestIn"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="exhibits" lowerBound="1"
+ eType="#//Architecture" eOpposite="#//Architecture/exhibitedIn"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Architecture">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="exhibitedIn" lowerBound="1"
+ eType="#//System" eOpposite="#//System/exhibits"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureRationale" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="justifies" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/justifiedBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Correspondence">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governedBy" upperBound="-1"
+ eType="#//CorrespondenceRule" eOpposite="#//CorrespondenceRule/governs"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="relates" lowerBound="2"
+ upperBound="-1" eType="#//ADElement"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CorrespondenceRule">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="governs" lowerBound="1"
+ upperBound="-1" eType="#//Correspondence" eOpposite="#//Correspondence/governedBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureDecision" eSuperTypes="#//ADElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="justifiedBy" upperBound="-1"
+ eType="#//ArchitectureRationale" eOpposite="#//ArchitectureRationale/justifies"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dependsUpon" upperBound="-1"
+ eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/dependents"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dependents" upperBound="-1"
+ eType="#//ArchitectureDecision" eOpposite="#//ArchitectureDecision/dependsUpon"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="raises" upperBound="-1"
+ eType="#//Concern" eOpposite="#//Concern/raisedBy"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="pertainsTo" lowerBound="1"
+ upperBound="-1" eType="#//Concern" eOpposite="#//Concern/decisions"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="affects" lowerBound="1"
+ upperBound="-1" eType="#//ADElement" eOpposite="#//ADElement/affectedBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ArchitectureFramework">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stakeholders" lowerBound="1"
+ upperBound="-1" eType="#//Stakeholder" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpoints" lowerBound="1"
+ upperBound="-1" eType="#//ArchitectureViewpoint" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1"
+ eType="#//CorrespondenceRule" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="concerns" lowerBound="1"
+ upperBound="-1" eType="#//Concern" containment="true"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel
new file mode 100755
index 00000000000..e64c5473b37
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.viewpoints.iso42010/src"
+ modelPluginID="org.eclipse.papyrus.infra.viewpoints.iso42010" modelName="Iso42010"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false" operationReflection="true" importOrganizing="true">
+ <foreignModel>iso42010.ecore</foreignModel>
+ <genPackages prefix="Iso42010" basePackage="org.eclipse.papyrus.infra.viewpoints"
+ disposableProviderFactory="true" ecorePackage="iso42010.ecore#/">
+ <genClasses image="false" ecoreClass="iso42010.ecore#//ADElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iso42010.ecore#//ADElement/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ADElement/affectedBy"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureDescription">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/stakeholders"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/concerns"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/viewpoints"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/views"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/system"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/expresses"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/rationales"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/correspondences"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/rules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDescription/decisions"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//Stakeholder">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Stakeholder/concerns"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Stakeholder/viewpoints"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Stakeholder/hasInterestIn"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureViewpoint">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureViewpoint/modelKinds"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureViewpoint/governs"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureViewpoint/frames"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ModelKind">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ModelKind/governs"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference iso42010.ecore#//ModelKind/viewpoint"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureModel">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureModel/governedBy"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureModel/view"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureView">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureView/governedBy"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureView/models"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureView/addresses"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//Concern">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Concern/framedBy"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Concern/addressedBy"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Concern/stakeholders"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Concern/raisedBy"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Concern/decisions"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//System">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iso42010.ecore#//System/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//System/stakeholders"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//System/exhibits"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//Architecture">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Architecture/exhibitedIn"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureRationale">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureRationale/justifies"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//Correspondence">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Correspondence/governedBy"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//Correspondence/relates"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//CorrespondenceRule">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//CorrespondenceRule/governs"/>
+ </genClasses>
+ <genClasses ecoreClass="iso42010.ecore#//ArchitectureDecision">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/justifiedBy"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/dependsUpon"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/dependents"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/raises"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/pertainsTo"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iso42010.ecore#//ArchitectureDecision/affects"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.properties
new file mode 100755
index 00000000000..37c0795db11
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.properties
@@ -0,0 +1,16 @@
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus ISO42010 Implementation (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.xml
new file mode 100755
index 00000000000..0146b430bc6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/plugin.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated iso42010 -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/viewpoints/iso42010"
+ class="org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package"
+ genModel="model/iso42010.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ADElement.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ADElement.java
new file mode 100755
index 00000000000..2aa09b8ebe2
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ADElement.java
@@ -0,0 +1,82 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>AD Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getAffectedBy <em>Affected By</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getADElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ADElement extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getADElement_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Affected By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getAffects <em>Affects</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Affected By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Affected By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getADElement_AffectedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getAffects
+ * @model opposite="affects"
+ * @generated
+ */
+ EList<ArchitectureDecision> getAffectedBy();
+
+} // ADElement
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Activator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Activator.java
new file mode 100755
index 00000000000..30776510ccd
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Activator.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Architecture.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Architecture.java
new file mode 100755
index 00000000000..d5bd04e12e6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Architecture.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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn <em>Exhibited In</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitecture()
+ * @model
+ * @generated
+ */
+public interface Architecture extends EObject {
+ /**
+ * Returns the value of the '<em><b>Exhibited In</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits <em>Exhibits</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Exhibited In</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Exhibited In</em>' reference.
+ * @see #setExhibitedIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitecture_ExhibitedIn()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits
+ * @model opposite="exhibits" required="true"
+ * @generated
+ */
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System getExhibitedIn();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn <em>Exhibited In</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Exhibited In</em>' reference.
+ * @see #getExhibitedIn()
+ * @generated
+ */
+ void setExhibitedIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System value);
+
+} // Architecture
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDecision.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDecision.java
new file mode 100755
index 00000000000..b5522541282
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDecision.java
@@ -0,0 +1,148 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Decision</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getJustifiedBy <em>Justified By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependsUpon <em>Depends Upon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependents <em>Dependents</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getRaises <em>Raises</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getPertainsTo <em>Pertains To</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getAffects <em>Affects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision()
+ * @model
+ * @generated
+ */
+public interface ArchitectureDecision extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Justified By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale#getJustifies <em>Justifies</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Justified By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Justified By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_JustifiedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale#getJustifies
+ * @model opposite="justifies"
+ * @generated
+ */
+ EList<ArchitectureRationale> getJustifiedBy();
+
+ /**
+ * Returns the value of the '<em><b>Depends Upon</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependents <em>Dependents</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Depends Upon</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Depends Upon</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_DependsUpon()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependents
+ * @model opposite="dependents"
+ * @generated
+ */
+ EList<ArchitectureDecision> getDependsUpon();
+
+ /**
+ * Returns the value of the '<em><b>Dependents</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependsUpon <em>Depends Upon</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Dependents</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Dependents</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_Dependents()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependsUpon
+ * @model opposite="dependsUpon"
+ * @generated
+ */
+ EList<ArchitectureDecision> getDependents();
+
+ /**
+ * Returns the value of the '<em><b>Raises</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getRaisedBy <em>Raised By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Raises</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Raises</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_Raises()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getRaisedBy
+ * @model opposite="raisedBy"
+ * @generated
+ */
+ EList<Concern> getRaises();
+
+ /**
+ * Returns the value of the '<em><b>Pertains To</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getDecisions <em>Decisions</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Pertains To</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pertains To</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_PertainsTo()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getDecisions
+ * @model opposite="decisions" required="true"
+ * @generated
+ */
+ EList<Concern> getPertainsTo();
+
+ /**
+ * Returns the value of the '<em><b>Affects</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getAffectedBy <em>Affected By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Affects</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Affects</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDecision_Affects()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getAffectedBy
+ * @model opposite="affectedBy" required="true"
+ * @generated
+ */
+ EList<ADElement> getAffects();
+
+} // ArchitectureDecision
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDescription.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDescription.java
new file mode 100755
index 00000000000..bae2547375f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureDescription.java
@@ -0,0 +1,226 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Description</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViews <em>Views</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getSystem <em>System</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getExpresses <em>Expresses</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRationales <em>Rationales</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getCorrespondences <em>Correspondences</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRules <em>Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getDecisions <em>Decisions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription()
+ * @model
+ * @generated
+ */
+public interface ArchitectureDescription extends EObject {
+ /**
+ * Returns the value of the '<em><b>Stakeholders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stakeholders</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stakeholders</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Stakeholders()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<Stakeholder> getStakeholders();
+
+ /**
+ * Returns the value of the '<em><b>Concerns</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Concerns</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Concerns</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Concerns()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<Concern> getConcerns();
+
+ /**
+ * Returns the value of the '<em><b>Viewpoints</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoints</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoints</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Viewpoints()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<ArchitectureViewpoint> getViewpoints();
+
+ /**
+ * Returns the value of the '<em><b>Views</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Views</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Views</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Views()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<ArchitectureView> getViews();
+
+ /**
+ * Returns the value of the '<em><b>System</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>System</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>System</em>' containment reference.
+ * @see #setSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_System()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System getSystem();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getSystem <em>System</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>System</em>' containment reference.
+ * @see #getSystem()
+ * @generated
+ */
+ void setSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System value);
+
+ /**
+ * Returns the value of the '<em><b>Expresses</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expresses</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expresses</em>' containment reference.
+ * @see #setExpresses(Architecture)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Expresses()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ Architecture getExpresses();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getExpresses <em>Expresses</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expresses</em>' containment reference.
+ * @see #getExpresses()
+ * @generated
+ */
+ void setExpresses(Architecture value);
+
+ /**
+ * Returns the value of the '<em><b>Rationales</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Rationales</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Rationales</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Rationales()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<ArchitectureRationale> getRationales();
+
+ /**
+ * Returns the value of the '<em><b>Correspondences</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Correspondences</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Correspondences</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Correspondences()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Correspondence> getCorrespondences();
+
+ /**
+ * Returns the value of the '<em><b>Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Rules</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Rules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<CorrespondenceRule> getRules();
+
+ /**
+ * Returns the value of the '<em><b>Decisions</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Decisions</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Decisions</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureDescription_Decisions()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ArchitectureDecision> getDecisions();
+
+} // ArchitectureDescription
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureFramework.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureFramework.java
new file mode 100755
index 00000000000..18493073e01
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureFramework.java
@@ -0,0 +1,104 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Framework</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getRules <em>Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getConcerns <em>Concerns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureFramework()
+ * @model
+ * @generated
+ */
+public interface ArchitectureFramework extends EObject {
+ /**
+ * Returns the value of the '<em><b>Stakeholders</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stakeholders</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stakeholders</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureFramework_Stakeholders()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<Stakeholder> getStakeholders();
+
+ /**
+ * Returns the value of the '<em><b>Viewpoints</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoints</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoints</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureFramework_Viewpoints()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<ArchitectureViewpoint> getViewpoints();
+
+ /**
+ * Returns the value of the '<em><b>Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Rules</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureFramework_Rules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<CorrespondenceRule> getRules();
+
+ /**
+ * Returns the value of the '<em><b>Concerns</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Concerns</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Concerns</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureFramework_Concerns()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<Concern> getConcerns();
+
+} // ArchitectureFramework
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureModel.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureModel.java
new file mode 100755
index 00000000000..177fca1dcb4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureModel.java
@@ -0,0 +1,91 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Model</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView <em>View</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureModel()
+ * @model
+ * @generated
+ */
+public interface ArchitectureModel extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Governed By</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governed By</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governed By</em>' reference.
+ * @see #setGovernedBy(ModelKind)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureModel_GovernedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getGoverns
+ * @model opposite="governs" required="true"
+ * @generated
+ */
+ ModelKind getGovernedBy();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy <em>Governed By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Governed By</em>' reference.
+ * @see #getGovernedBy()
+ * @generated
+ */
+ void setGovernedBy(ModelKind value);
+
+ /**
+ * Returns the value of the '<em><b>View</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getModels <em>Models</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>View</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>View</em>' container reference.
+ * @see #setView(ArchitectureView)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureModel_View()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getModels
+ * @model opposite="models" required="true" transient="false"
+ * @generated
+ */
+ ArchitectureView getView();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView <em>View</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>View</em>' container reference.
+ * @see #getView()
+ * @generated
+ */
+ void setView(ArchitectureView value);
+
+} // ArchitectureModel
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureRationale.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureRationale.java
new file mode 100755
index 00000000000..051ccbfea51
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureRationale.java
@@ -0,0 +1,53 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Rationale</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale#getJustifies <em>Justifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureRationale()
+ * @model
+ * @generated
+ */
+public interface ArchitectureRationale extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Justifies</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getJustifiedBy <em>Justified By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Justifies</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Justifies</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureRationale_Justifies()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getJustifiedBy
+ * @model opposite="justifiedBy" required="true"
+ * @generated
+ */
+ EList<ArchitectureDecision> getJustifies();
+
+} // ArchitectureRationale
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureView.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureView.java
new file mode 100755
index 00000000000..ce676c69bf5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureView.java
@@ -0,0 +1,101 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture View</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getModels <em>Models</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getAddresses <em>Addresses</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureView()
+ * @model
+ * @generated
+ */
+public interface ArchitectureView extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Governed By</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governed By</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governed By</em>' reference.
+ * @see #setGovernedBy(ArchitectureViewpoint)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureView_GovernedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns
+ * @model opposite="governs" required="true"
+ * @generated
+ */
+ ArchitectureViewpoint getGovernedBy();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy <em>Governed By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Governed By</em>' reference.
+ * @see #getGovernedBy()
+ * @generated
+ */
+ void setGovernedBy(ArchitectureViewpoint value);
+
+ /**
+ * Returns the value of the '<em><b>Models</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView <em>View</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Models</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Models</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureView_Models()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView
+ * @model opposite="view" containment="true" required="true"
+ * @generated
+ */
+ EList<ArchitectureModel> getModels();
+
+ /**
+ * Returns the value of the '<em><b>Addresses</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getAddressedBy <em>Addressed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Addresses</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Addresses</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureView_Addresses()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getAddressedBy
+ * @model opposite="addressedBy" required="true"
+ * @generated
+ */
+ EList<Concern> getAddresses();
+
+} // ArchitectureView
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureViewpoint.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureViewpoint.java
new file mode 100755
index 00000000000..6f66a7d6af0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ArchitectureViewpoint.java
@@ -0,0 +1,101 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Architecture Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getModelKinds <em>Model Kinds</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns <em>Governs</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getFrames <em>Frames</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureViewpoint()
+ * @model
+ * @generated
+ */
+public interface ArchitectureViewpoint extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Model Kinds</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Model Kinds</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Model Kinds</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureViewpoint_ModelKinds()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint
+ * @model opposite="viewpoint" containment="true" required="true"
+ * @generated
+ */
+ EList<ModelKind> getModelKinds();
+
+ /**
+ * Returns the value of the '<em><b>Governs</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governs</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governs</em>' reference.
+ * @see #setGoverns(ArchitectureView)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureViewpoint_Governs()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy
+ * @model opposite="governedBy" required="true"
+ * @generated
+ */
+ ArchitectureView getGoverns();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns <em>Governs</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Governs</em>' reference.
+ * @see #getGoverns()
+ * @generated
+ */
+ void setGoverns(ArchitectureView value);
+
+ /**
+ * Returns the value of the '<em><b>Frames</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getFramedBy <em>Framed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Frames</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Frames</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getArchitectureViewpoint_Frames()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getFramedBy
+ * @model opposite="framedBy" required="true"
+ * @generated
+ */
+ EList<Concern> getFrames();
+
+} // ArchitectureViewpoint
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Concern.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Concern.java
new file mode 100755
index 00000000000..a06d56d343f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Concern.java
@@ -0,0 +1,129 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Concern</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getFramedBy <em>Framed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getAddressedBy <em>Addressed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getRaisedBy <em>Raised By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getDecisions <em>Decisions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern()
+ * @model
+ * @generated
+ */
+public interface Concern extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Framed By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getFrames <em>Frames</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Framed By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Framed By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern_FramedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getFrames
+ * @model opposite="frames" required="true"
+ * @generated
+ */
+ EList<ArchitectureViewpoint> getFramedBy();
+
+ /**
+ * Returns the value of the '<em><b>Addressed By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getAddresses <em>Addresses</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Addressed By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Addressed By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern_AddressedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getAddresses
+ * @model opposite="addresses" required="true"
+ * @generated
+ */
+ EList<ArchitectureView> getAddressedBy();
+
+ /**
+ * Returns the value of the '<em><b>Stakeholders</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getConcerns <em>Concerns</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stakeholders</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stakeholders</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern_Stakeholders()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getConcerns
+ * @model opposite="concerns" required="true"
+ * @generated
+ */
+ EList<Stakeholder> getStakeholders();
+
+ /**
+ * Returns the value of the '<em><b>Raised By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getRaises <em>Raises</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Raised By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Raised By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern_RaisedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getRaises
+ * @model opposite="raises"
+ * @generated
+ */
+ EList<ArchitectureDecision> getRaisedBy();
+
+ /**
+ * Returns the value of the '<em><b>Decisions</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getPertainsTo <em>Pertains To</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Decisions</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Decisions</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getConcern_Decisions()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getPertainsTo
+ * @model opposite="pertainsTo"
+ * @generated
+ */
+ EList<ArchitectureDecision> getDecisions();
+
+} // Concern
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Correspondence.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Correspondence.java
new file mode 100755
index 00000000000..a3944440af9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Correspondence.java
@@ -0,0 +1,72 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Correspondence</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getRelates <em>Relates</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getCorrespondence()
+ * @model
+ * @generated
+ */
+public interface Correspondence extends EObject {
+ /**
+ * Returns the value of the '<em><b>Governed By</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governed By</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governed By</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getCorrespondence_GovernedBy()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule#getGoverns
+ * @model opposite="governs"
+ * @generated
+ */
+ EList<CorrespondenceRule> getGovernedBy();
+
+ /**
+ * Returns the value of the '<em><b>Relates</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Relates</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Relates</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getCorrespondence_Relates()
+ * @model lower="2"
+ * @generated
+ */
+ EList<ADElement> getRelates();
+
+} // Correspondence
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/CorrespondenceRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/CorrespondenceRule.java
new file mode 100755
index 00000000000..0c4827d5b85
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/CorrespondenceRule.java
@@ -0,0 +1,55 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Correspondence Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule#getGoverns <em>Governs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getCorrespondenceRule()
+ * @model
+ * @generated
+ */
+public interface CorrespondenceRule extends EObject {
+ /**
+ * Returns the value of the '<em><b>Governs</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governs</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governs</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getCorrespondenceRule_Governs()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getGovernedBy
+ * @model opposite="governedBy" required="true"
+ * @generated
+ */
+ EList<Correspondence> getGoverns();
+
+} // CorrespondenceRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Factory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Factory.java
new file mode 100755
index 00000000000..6dae5008f9e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Factory.java
@@ -0,0 +1,170 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package
+ * @generated
+ */
+public interface Iso42010Factory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ Iso42010Factory eINSTANCE = org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010FactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Architecture Description</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Description</em>'.
+ * @generated
+ */
+ ArchitectureDescription createArchitectureDescription();
+
+ /**
+ * Returns a new object of class '<em>Stakeholder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Stakeholder</em>'.
+ * @generated
+ */
+ Stakeholder createStakeholder();
+
+ /**
+ * Returns a new object of class '<em>Architecture Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Viewpoint</em>'.
+ * @generated
+ */
+ ArchitectureViewpoint createArchitectureViewpoint();
+
+ /**
+ * Returns a new object of class '<em>Model Kind</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Model Kind</em>'.
+ * @generated
+ */
+ ModelKind createModelKind();
+
+ /**
+ * Returns a new object of class '<em>Architecture Model</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Model</em>'.
+ * @generated
+ */
+ ArchitectureModel createArchitectureModel();
+
+ /**
+ * Returns a new object of class '<em>Architecture View</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture View</em>'.
+ * @generated
+ */
+ ArchitectureView createArchitectureView();
+
+ /**
+ * Returns a new object of class '<em>Concern</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Concern</em>'.
+ * @generated
+ */
+ Concern createConcern();
+
+ /**
+ * Returns a new object of class '<em>System</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>System</em>'.
+ * @generated
+ */
+ System createSystem();
+
+ /**
+ * Returns a new object of class '<em>Architecture</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture</em>'.
+ * @generated
+ */
+ Architecture createArchitecture();
+
+ /**
+ * Returns a new object of class '<em>Architecture Rationale</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Rationale</em>'.
+ * @generated
+ */
+ ArchitectureRationale createArchitectureRationale();
+
+ /**
+ * Returns a new object of class '<em>Correspondence</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Correspondence</em>'.
+ * @generated
+ */
+ Correspondence createCorrespondence();
+
+ /**
+ * Returns a new object of class '<em>Correspondence Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Correspondence Rule</em>'.
+ * @generated
+ */
+ CorrespondenceRule createCorrespondenceRule();
+
+ /**
+ * Returns a new object of class '<em>Architecture Decision</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Decision</em>'.
+ * @generated
+ */
+ ArchitectureDecision createArchitectureDecision();
+
+ /**
+ * Returns a new object of class '<em>Architecture Framework</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Architecture Framework</em>'.
+ * @generated
+ */
+ ArchitectureFramework createArchitectureFramework();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ Iso42010Package getIso42010Package();
+
+} //Iso42010Factory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Package.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Package.java
new file mode 100755
index 00000000000..9fe05247991
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Iso42010Package.java
@@ -0,0 +1,2304 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory
+ * @model kind="package"
+ * @generated
+ */
+public interface Iso42010Package extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "iso42010";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/viewpoints/iso42010";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "iso42010";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ Iso42010Package eINSTANCE = org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl <em>AD Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getADElement()
+ * @generated
+ */
+ int AD_ELEMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AD_ELEMENT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AD_ELEMENT__AFFECTED_BY = 1;
+
+ /**
+ * The number of structural features of the '<em>AD Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AD_ELEMENT_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>AD Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int AD_ELEMENT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl <em>Architecture Description</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureDescription()
+ * @generated
+ */
+ int ARCHITECTURE_DESCRIPTION = 1;
+
+ /**
+ * The feature id for the '<em><b>Stakeholders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__STAKEHOLDERS = 0;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__CONCERNS = 1;
+
+ /**
+ * The feature id for the '<em><b>Viewpoints</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__VIEWPOINTS = 2;
+
+ /**
+ * The feature id for the '<em><b>Views</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__VIEWS = 3;
+
+ /**
+ * The feature id for the '<em><b>System</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__SYSTEM = 4;
+
+ /**
+ * The feature id for the '<em><b>Expresses</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__EXPRESSES = 5;
+
+ /**
+ * The feature id for the '<em><b>Rationales</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__RATIONALES = 6;
+
+ /**
+ * The feature id for the '<em><b>Correspondences</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__CORRESPONDENCES = 7;
+
+ /**
+ * The feature id for the '<em><b>Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__RULES = 8;
+
+ /**
+ * The feature id for the '<em><b>Decisions</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION__DECISIONS = 9;
+
+ /**
+ * The number of structural features of the '<em>Architecture Description</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION_FEATURE_COUNT = 10;
+
+ /**
+ * The number of operations of the '<em>Architecture Description</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DESCRIPTION_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl <em>Stakeholder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getStakeholder()
+ * @generated
+ */
+ int STAKEHOLDER = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER__CONCERNS = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Viewpoints</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER__VIEWPOINTS = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Has Interest In</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER__HAS_INTEREST_IN = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Stakeholder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Stakeholder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STAKEHOLDER_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl <em>Architecture Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureViewpoint()
+ * @generated
+ */
+ int ARCHITECTURE_VIEWPOINT = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Model Kinds</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT__MODEL_KINDS = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT__GOVERNS = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Frames</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT__FRAMES = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Architecture Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Architecture Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEWPOINT_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl <em>Model Kind</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getModelKind()
+ * @generated
+ */
+ int MODEL_KIND = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND__GOVERNS = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND__VIEWPOINT = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Model Kind</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Model Kind</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_KIND_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl <em>Architecture Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureModel()
+ * @generated
+ */
+ int ARCHITECTURE_MODEL = 5;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governed By</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL__GOVERNED_BY = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>View</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL__VIEW = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Architecture Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Architecture Model</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_MODEL_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl <em>Architecture View</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureView()
+ * @generated
+ */
+ int ARCHITECTURE_VIEW = 6;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Governed By</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW__GOVERNED_BY = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Models</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW__MODELS = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Addresses</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW__ADDRESSES = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Architecture View</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Architecture View</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_VIEW_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl <em>Concern</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getConcern()
+ * @generated
+ */
+ int CONCERN = 7;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Framed By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__FRAMED_BY = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Addressed By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__ADDRESSED_BY = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Stakeholders</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__STAKEHOLDERS = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Raised By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__RAISED_BY = AD_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Decisions</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN__DECISIONS = AD_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Concern</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of operations of the '<em>Concern</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONCERN_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl <em>System</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getSystem()
+ * @generated
+ */
+ int SYSTEM = 8;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SYSTEM__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Stakeholders</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SYSTEM__STAKEHOLDERS = 1;
+
+ /**
+ * The feature id for the '<em><b>Exhibits</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SYSTEM__EXHIBITS = 2;
+
+ /**
+ * The number of structural features of the '<em>System</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SYSTEM_FEATURE_COUNT = 3;
+
+ /**
+ * The number of operations of the '<em>System</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SYSTEM_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureImpl <em>Architecture</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitecture()
+ * @generated
+ */
+ int ARCHITECTURE = 9;
+
+ /**
+ * The feature id for the '<em><b>Exhibited In</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE__EXHIBITED_IN = 0;
+
+ /**
+ * The number of structural features of the '<em>Architecture</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Architecture</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureRationaleImpl <em>Architecture Rationale</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureRationaleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureRationale()
+ * @generated
+ */
+ int ARCHITECTURE_RATIONALE = 10;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_RATIONALE__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_RATIONALE__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Justifies</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_RATIONALE__JUSTIFIES = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Architecture Rationale</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_RATIONALE_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Architecture Rationale</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_RATIONALE_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl <em>Correspondence</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getCorrespondence()
+ * @generated
+ */
+ int CORRESPONDENCE = 11;
+
+ /**
+ * The feature id for the '<em><b>Governed By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE__GOVERNED_BY = 0;
+
+ /**
+ * The feature id for the '<em><b>Relates</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE__RELATES = 1;
+
+ /**
+ * The number of structural features of the '<em>Correspondence</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Correspondence</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceRuleImpl <em>Correspondence Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getCorrespondenceRule()
+ * @generated
+ */
+ int CORRESPONDENCE_RULE = 12;
+
+ /**
+ * The feature id for the '<em><b>Governs</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE_RULE__GOVERNS = 0;
+
+ /**
+ * The number of structural features of the '<em>Correspondence Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE_RULE_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Correspondence Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CORRESPONDENCE_RULE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl <em>Architecture Decision</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureDecision()
+ * @generated
+ */
+ int ARCHITECTURE_DECISION = 13;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__NAME = AD_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Affected By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__AFFECTED_BY = AD_ELEMENT__AFFECTED_BY;
+
+ /**
+ * The feature id for the '<em><b>Justified By</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__JUSTIFIED_BY = AD_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Depends Upon</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__DEPENDS_UPON = AD_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Dependents</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__DEPENDENTS = AD_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Raises</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__RAISES = AD_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Pertains To</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__PERTAINS_TO = AD_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Affects</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION__AFFECTS = AD_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Architecture Decision</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION_FEATURE_COUNT = AD_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The number of operations of the '<em>Architecture Decision</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_DECISION_OPERATION_COUNT = AD_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl <em>Architecture Framework</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureFramework()
+ * @generated
+ */
+ int ARCHITECTURE_FRAMEWORK = 14;
+
+ /**
+ * The feature id for the '<em><b>Stakeholders</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK__STAKEHOLDERS = 0;
+
+ /**
+ * The feature id for the '<em><b>Viewpoints</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK__VIEWPOINTS = 1;
+
+ /**
+ * The feature id for the '<em><b>Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK__RULES = 2;
+
+ /**
+ * The feature id for the '<em><b>Concerns</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK__CONCERNS = 3;
+
+ /**
+ * The number of structural features of the '<em>Architecture Framework</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK_FEATURE_COUNT = 4;
+
+ /**
+ * The number of operations of the '<em>Architecture Framework</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ARCHITECTURE_FRAMEWORK_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement <em>AD Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>AD Element</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement
+ * @generated
+ */
+ EClass getADElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getName()
+ * @see #getADElement()
+ * @generated
+ */
+ EAttribute getADElement_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getAffectedBy <em>Affected By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Affected By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement#getAffectedBy()
+ * @see #getADElement()
+ * @generated
+ */
+ EReference getADElement_AffectedBy();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription <em>Architecture Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Description</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription
+ * @generated
+ */
+ EClass getArchitectureDescription();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Stakeholders</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getStakeholders()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Stakeholders();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getConcerns <em>Concerns</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Concerns</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getConcerns()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Concerns();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViewpoints <em>Viewpoints</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Viewpoints</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViewpoints()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Viewpoints();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViews <em>Views</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Views</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getViews()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Views();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getSystem <em>System</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>System</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getSystem()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_System();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getExpresses <em>Expresses</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expresses</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getExpresses()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Expresses();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRationales <em>Rationales</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Rationales</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRationales()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Rationales();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getCorrespondences <em>Correspondences</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Correspondences</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getCorrespondences()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Correspondences();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRules <em>Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getRules()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Rules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getDecisions <em>Decisions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Decisions</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription#getDecisions()
+ * @see #getArchitectureDescription()
+ * @generated
+ */
+ EReference getArchitectureDescription_Decisions();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder <em>Stakeholder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Stakeholder</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder
+ * @generated
+ */
+ EClass getStakeholder();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getConcerns <em>Concerns</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Concerns</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getConcerns()
+ * @see #getStakeholder()
+ * @generated
+ */
+ EReference getStakeholder_Concerns();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getViewpoints <em>Viewpoints</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Viewpoints</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getViewpoints()
+ * @see #getStakeholder()
+ * @generated
+ */
+ EReference getStakeholder_Viewpoints();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn <em>Has Interest In</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Has Interest In</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn()
+ * @see #getStakeholder()
+ * @generated
+ */
+ EReference getStakeholder_HasInterestIn();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint <em>Architecture Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Viewpoint</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint
+ * @generated
+ */
+ EClass getArchitectureViewpoint();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getModelKinds <em>Model Kinds</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Model Kinds</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getModelKinds()
+ * @see #getArchitectureViewpoint()
+ * @generated
+ */
+ EReference getArchitectureViewpoint_ModelKinds();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Governs</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getGoverns()
+ * @see #getArchitectureViewpoint()
+ * @generated
+ */
+ EReference getArchitectureViewpoint_Governs();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getFrames <em>Frames</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Frames</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getFrames()
+ * @see #getArchitectureViewpoint()
+ * @generated
+ */
+ EReference getArchitectureViewpoint_Frames();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind <em>Model Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model Kind</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind
+ * @generated
+ */
+ EClass getModelKind();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Governs</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getGoverns()
+ * @see #getModelKind()
+ * @generated
+ */
+ EReference getModelKind_Governs();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Viewpoint</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint()
+ * @see #getModelKind()
+ * @generated
+ */
+ EReference getModelKind_Viewpoint();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel <em>Architecture Model</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Model</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel
+ * @generated
+ */
+ EClass getArchitectureModel();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Governed By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy()
+ * @see #getArchitectureModel()
+ * @generated
+ */
+ EReference getArchitectureModel_GovernedBy();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView <em>View</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>View</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getView()
+ * @see #getArchitectureModel()
+ * @generated
+ */
+ EReference getArchitectureModel_View();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView <em>Architecture View</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture View</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView
+ * @generated
+ */
+ EClass getArchitectureView();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Governed By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getGovernedBy()
+ * @see #getArchitectureView()
+ * @generated
+ */
+ EReference getArchitectureView_GovernedBy();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getModels <em>Models</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Models</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getModels()
+ * @see #getArchitectureView()
+ * @generated
+ */
+ EReference getArchitectureView_Models();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getAddresses <em>Addresses</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Addresses</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView#getAddresses()
+ * @see #getArchitectureView()
+ * @generated
+ */
+ EReference getArchitectureView_Addresses();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern <em>Concern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Concern</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern
+ * @generated
+ */
+ EClass getConcern();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getFramedBy <em>Framed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Framed By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getFramedBy()
+ * @see #getConcern()
+ * @generated
+ */
+ EReference getConcern_FramedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getAddressedBy <em>Addressed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Addressed By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getAddressedBy()
+ * @see #getConcern()
+ * @generated
+ */
+ EReference getConcern_AddressedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stakeholders</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getStakeholders()
+ * @see #getConcern()
+ * @generated
+ */
+ EReference getConcern_Stakeholders();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getRaisedBy <em>Raised By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Raised By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getRaisedBy()
+ * @see #getConcern()
+ * @generated
+ */
+ EReference getConcern_RaisedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getDecisions <em>Decisions</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Decisions</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getDecisions()
+ * @see #getConcern()
+ * @generated
+ */
+ EReference getConcern_Decisions();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System <em>System</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>System</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System
+ * @generated
+ */
+ EClass getSystem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System#getName()
+ * @see #getSystem()
+ * @generated
+ */
+ EAttribute getSystem_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stakeholders</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System#getStakeholders()
+ * @see #getSystem()
+ * @generated
+ */
+ EReference getSystem_Stakeholders();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits <em>Exhibits</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Exhibits</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits()
+ * @see #getSystem()
+ * @generated
+ */
+ EReference getSystem_Exhibits();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture <em>Architecture</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture
+ * @generated
+ */
+ EClass getArchitecture();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn <em>Exhibited In</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Exhibited In</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn()
+ * @see #getArchitecture()
+ * @generated
+ */
+ EReference getArchitecture_ExhibitedIn();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale <em>Architecture Rationale</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Rationale</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale
+ * @generated
+ */
+ EClass getArchitectureRationale();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale#getJustifies <em>Justifies</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Justifies</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale#getJustifies()
+ * @see #getArchitectureRationale()
+ * @generated
+ */
+ EReference getArchitectureRationale_Justifies();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence <em>Correspondence</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Correspondence</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence
+ * @generated
+ */
+ EClass getCorrespondence();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Governed By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getGovernedBy()
+ * @see #getCorrespondence()
+ * @generated
+ */
+ EReference getCorrespondence_GovernedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getRelates <em>Relates</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Relates</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence#getRelates()
+ * @see #getCorrespondence()
+ * @generated
+ */
+ EReference getCorrespondence_Relates();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule <em>Correspondence Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Correspondence Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule
+ * @generated
+ */
+ EClass getCorrespondenceRule();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule#getGoverns <em>Governs</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Governs</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule#getGoverns()
+ * @see #getCorrespondenceRule()
+ * @generated
+ */
+ EReference getCorrespondenceRule_Governs();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision <em>Architecture Decision</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Decision</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision
+ * @generated
+ */
+ EClass getArchitectureDecision();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getJustifiedBy <em>Justified By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Justified By</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getJustifiedBy()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_JustifiedBy();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependsUpon <em>Depends Upon</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Depends Upon</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependsUpon()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_DependsUpon();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependents <em>Dependents</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Dependents</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getDependents()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_Dependents();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getRaises <em>Raises</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Raises</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getRaises()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_Raises();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getPertainsTo <em>Pertains To</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Pertains To</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getPertainsTo()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_PertainsTo();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getAffects <em>Affects</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Affects</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision#getAffects()
+ * @see #getArchitectureDecision()
+ * @generated
+ */
+ EReference getArchitectureDecision_Affects();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework <em>Architecture Framework</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Architecture Framework</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework
+ * @generated
+ */
+ EClass getArchitectureFramework();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Stakeholders</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getStakeholders()
+ * @see #getArchitectureFramework()
+ * @generated
+ */
+ EReference getArchitectureFramework_Stakeholders();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getViewpoints <em>Viewpoints</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Viewpoints</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getViewpoints()
+ * @see #getArchitectureFramework()
+ * @generated
+ */
+ EReference getArchitectureFramework_Viewpoints();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getRules <em>Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getRules()
+ * @see #getArchitectureFramework()
+ * @generated
+ */
+ EReference getArchitectureFramework_Rules();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getConcerns <em>Concerns</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Concerns</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework#getConcerns()
+ * @see #getArchitectureFramework()
+ * @generated
+ */
+ EReference getArchitectureFramework_Concerns();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ Iso42010Factory getIso42010Factory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl <em>AD Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getADElement()
+ * @generated
+ */
+ EClass AD_ELEMENT = eINSTANCE.getADElement();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute AD_ELEMENT__NAME = eINSTANCE.getADElement_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Affected By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference AD_ELEMENT__AFFECTED_BY = eINSTANCE.getADElement_AffectedBy();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl <em>Architecture Description</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureDescription()
+ * @generated
+ */
+ EClass ARCHITECTURE_DESCRIPTION = eINSTANCE.getArchitectureDescription();
+
+ /**
+ * The meta object literal for the '<em><b>Stakeholders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__STAKEHOLDERS = eINSTANCE.getArchitectureDescription_Stakeholders();
+
+ /**
+ * The meta object literal for the '<em><b>Concerns</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__CONCERNS = eINSTANCE.getArchitectureDescription_Concerns();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoints</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__VIEWPOINTS = eINSTANCE.getArchitectureDescription_Viewpoints();
+
+ /**
+ * The meta object literal for the '<em><b>Views</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__VIEWS = eINSTANCE.getArchitectureDescription_Views();
+
+ /**
+ * The meta object literal for the '<em><b>System</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__SYSTEM = eINSTANCE.getArchitectureDescription_System();
+
+ /**
+ * The meta object literal for the '<em><b>Expresses</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__EXPRESSES = eINSTANCE.getArchitectureDescription_Expresses();
+
+ /**
+ * The meta object literal for the '<em><b>Rationales</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__RATIONALES = eINSTANCE.getArchitectureDescription_Rationales();
+
+ /**
+ * The meta object literal for the '<em><b>Correspondences</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__CORRESPONDENCES = eINSTANCE.getArchitectureDescription_Correspondences();
+
+ /**
+ * The meta object literal for the '<em><b>Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__RULES = eINSTANCE.getArchitectureDescription_Rules();
+
+ /**
+ * The meta object literal for the '<em><b>Decisions</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DESCRIPTION__DECISIONS = eINSTANCE.getArchitectureDescription_Decisions();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl <em>Stakeholder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getStakeholder()
+ * @generated
+ */
+ EClass STAKEHOLDER = eINSTANCE.getStakeholder();
+
+ /**
+ * The meta object literal for the '<em><b>Concerns</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STAKEHOLDER__CONCERNS = eINSTANCE.getStakeholder_Concerns();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoints</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STAKEHOLDER__VIEWPOINTS = eINSTANCE.getStakeholder_Viewpoints();
+
+ /**
+ * The meta object literal for the '<em><b>Has Interest In</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STAKEHOLDER__HAS_INTEREST_IN = eINSTANCE.getStakeholder_HasInterestIn();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl <em>Architecture Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureViewpoint()
+ * @generated
+ */
+ EClass ARCHITECTURE_VIEWPOINT = eINSTANCE.getArchitectureViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Model Kinds</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEWPOINT__MODEL_KINDS = eINSTANCE.getArchitectureViewpoint_ModelKinds();
+
+ /**
+ * The meta object literal for the '<em><b>Governs</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEWPOINT__GOVERNS = eINSTANCE.getArchitectureViewpoint_Governs();
+
+ /**
+ * The meta object literal for the '<em><b>Frames</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEWPOINT__FRAMES = eINSTANCE.getArchitectureViewpoint_Frames();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl <em>Model Kind</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getModelKind()
+ * @generated
+ */
+ EClass MODEL_KIND = eINSTANCE.getModelKind();
+
+ /**
+ * The meta object literal for the '<em><b>Governs</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_KIND__GOVERNS = eINSTANCE.getModelKind_Governs();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoint</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_KIND__VIEWPOINT = eINSTANCE.getModelKind_Viewpoint();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl <em>Architecture Model</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureModel()
+ * @generated
+ */
+ EClass ARCHITECTURE_MODEL = eINSTANCE.getArchitectureModel();
+
+ /**
+ * The meta object literal for the '<em><b>Governed By</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_MODEL__GOVERNED_BY = eINSTANCE.getArchitectureModel_GovernedBy();
+
+ /**
+ * The meta object literal for the '<em><b>View</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_MODEL__VIEW = eINSTANCE.getArchitectureModel_View();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl <em>Architecture View</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureView()
+ * @generated
+ */
+ EClass ARCHITECTURE_VIEW = eINSTANCE.getArchitectureView();
+
+ /**
+ * The meta object literal for the '<em><b>Governed By</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEW__GOVERNED_BY = eINSTANCE.getArchitectureView_GovernedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Models</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEW__MODELS = eINSTANCE.getArchitectureView_Models();
+
+ /**
+ * The meta object literal for the '<em><b>Addresses</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_VIEW__ADDRESSES = eINSTANCE.getArchitectureView_Addresses();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl <em>Concern</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getConcern()
+ * @generated
+ */
+ EClass CONCERN = eINSTANCE.getConcern();
+
+ /**
+ * The meta object literal for the '<em><b>Framed By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONCERN__FRAMED_BY = eINSTANCE.getConcern_FramedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Addressed By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONCERN__ADDRESSED_BY = eINSTANCE.getConcern_AddressedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Stakeholders</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONCERN__STAKEHOLDERS = eINSTANCE.getConcern_Stakeholders();
+
+ /**
+ * The meta object literal for the '<em><b>Raised By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONCERN__RAISED_BY = eINSTANCE.getConcern_RaisedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Decisions</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONCERN__DECISIONS = eINSTANCE.getConcern_Decisions();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl <em>System</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getSystem()
+ * @generated
+ */
+ EClass SYSTEM = eINSTANCE.getSystem();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SYSTEM__NAME = eINSTANCE.getSystem_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Stakeholders</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SYSTEM__STAKEHOLDERS = eINSTANCE.getSystem_Stakeholders();
+
+ /**
+ * The meta object literal for the '<em><b>Exhibits</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SYSTEM__EXHIBITS = eINSTANCE.getSystem_Exhibits();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureImpl <em>Architecture</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitecture()
+ * @generated
+ */
+ EClass ARCHITECTURE = eINSTANCE.getArchitecture();
+
+ /**
+ * The meta object literal for the '<em><b>Exhibited In</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE__EXHIBITED_IN = eINSTANCE.getArchitecture_ExhibitedIn();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureRationaleImpl <em>Architecture Rationale</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureRationaleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureRationale()
+ * @generated
+ */
+ EClass ARCHITECTURE_RATIONALE = eINSTANCE.getArchitectureRationale();
+
+ /**
+ * The meta object literal for the '<em><b>Justifies</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_RATIONALE__JUSTIFIES = eINSTANCE.getArchitectureRationale_Justifies();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl <em>Correspondence</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getCorrespondence()
+ * @generated
+ */
+ EClass CORRESPONDENCE = eINSTANCE.getCorrespondence();
+
+ /**
+ * The meta object literal for the '<em><b>Governed By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CORRESPONDENCE__GOVERNED_BY = eINSTANCE.getCorrespondence_GovernedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Relates</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CORRESPONDENCE__RELATES = eINSTANCE.getCorrespondence_Relates();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceRuleImpl <em>Correspondence Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getCorrespondenceRule()
+ * @generated
+ */
+ EClass CORRESPONDENCE_RULE = eINSTANCE.getCorrespondenceRule();
+
+ /**
+ * The meta object literal for the '<em><b>Governs</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CORRESPONDENCE_RULE__GOVERNS = eINSTANCE.getCorrespondenceRule_Governs();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl <em>Architecture Decision</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureDecision()
+ * @generated
+ */
+ EClass ARCHITECTURE_DECISION = eINSTANCE.getArchitectureDecision();
+
+ /**
+ * The meta object literal for the '<em><b>Justified By</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__JUSTIFIED_BY = eINSTANCE.getArchitectureDecision_JustifiedBy();
+
+ /**
+ * The meta object literal for the '<em><b>Depends Upon</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__DEPENDS_UPON = eINSTANCE.getArchitectureDecision_DependsUpon();
+
+ /**
+ * The meta object literal for the '<em><b>Dependents</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__DEPENDENTS = eINSTANCE.getArchitectureDecision_Dependents();
+
+ /**
+ * The meta object literal for the '<em><b>Raises</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__RAISES = eINSTANCE.getArchitectureDecision_Raises();
+
+ /**
+ * The meta object literal for the '<em><b>Pertains To</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__PERTAINS_TO = eINSTANCE.getArchitectureDecision_PertainsTo();
+
+ /**
+ * The meta object literal for the '<em><b>Affects</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_DECISION__AFFECTS = eINSTANCE.getArchitectureDecision_Affects();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl <em>Architecture Framework</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.impl.Iso42010PackageImpl#getArchitectureFramework()
+ * @generated
+ */
+ EClass ARCHITECTURE_FRAMEWORK = eINSTANCE.getArchitectureFramework();
+
+ /**
+ * The meta object literal for the '<em><b>Stakeholders</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_FRAMEWORK__STAKEHOLDERS = eINSTANCE.getArchitectureFramework_Stakeholders();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoints</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_FRAMEWORK__VIEWPOINTS = eINSTANCE.getArchitectureFramework_Viewpoints();
+
+ /**
+ * The meta object literal for the '<em><b>Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_FRAMEWORK__RULES = eINSTANCE.getArchitectureFramework_Rules();
+
+ /**
+ * The meta object literal for the '<em><b>Concerns</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ARCHITECTURE_FRAMEWORK__CONCERNS = eINSTANCE.getArchitectureFramework_Concerns();
+
+ }
+
+} //Iso42010Package
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ModelKind.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ModelKind.java
new file mode 100755
index 00000000000..3b33317b3b1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/ModelKind.java
@@ -0,0 +1,82 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Kind</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getGoverns <em>Governs</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint <em>Viewpoint</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getModelKind()
+ * @model
+ * @generated
+ */
+public interface ModelKind extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Governs</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy <em>Governed By</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Governs</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Governs</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getModelKind_Governs()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel#getGovernedBy
+ * @model opposite="governedBy" required="true"
+ * @generated
+ */
+ EList<ArchitectureModel> getGoverns();
+
+ /**
+ * Returns the value of the '<em><b>Viewpoint</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getModelKinds <em>Model Kinds</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoint</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoint</em>' container reference.
+ * @see #setViewpoint(ArchitectureViewpoint)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getModelKind_Viewpoint()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint#getModelKinds
+ * @model opposite="modelKinds" required="true" transient="false"
+ * @generated
+ */
+ ArchitectureViewpoint getViewpoint();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind#getViewpoint <em>Viewpoint</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Viewpoint</em>' container reference.
+ * @see #getViewpoint()
+ * @generated
+ */
+ void setViewpoint(ArchitectureViewpoint value);
+
+} // ModelKind
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Stakeholder.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Stakeholder.java
new file mode 100755
index 00000000000..75ed915763d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/Stakeholder.java
@@ -0,0 +1,99 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stakeholder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn <em>Has Interest In</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getStakeholder()
+ * @model
+ * @generated
+ */
+public interface Stakeholder extends ADElement {
+ /**
+ * Returns the value of the '<em><b>Concerns</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Concerns</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Concerns</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getStakeholder_Concerns()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern#getStakeholders
+ * @model opposite="stakeholders" required="true"
+ * @generated
+ */
+ EList<Concern> getConcerns();
+
+ /**
+ * Returns the value of the '<em><b>Viewpoints</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoints</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoints</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getStakeholder_Viewpoints()
+ * @model required="true"
+ * @generated
+ */
+ EList<ArchitectureViewpoint> getViewpoints();
+
+ /**
+ * Returns the value of the '<em><b>Has Interest In</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getStakeholders <em>Stakeholders</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Has Interest In</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Has Interest In</em>' reference.
+ * @see #setHasInterestIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getStakeholder_HasInterestIn()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System#getStakeholders
+ * @model opposite="stakeholders" required="true"
+ * @generated
+ */
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System getHasInterestIn();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn <em>Has Interest In</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Has Interest In</em>' reference.
+ * @see #getHasInterestIn()
+ * @generated
+ */
+ void setHasInterestIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System value);
+
+} // Stakeholder
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/System.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/System.java
new file mode 100755
index 00000000000..0e5b51cfd08
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/System.java
@@ -0,0 +1,111 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>System</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits <em>Exhibits</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getSystem()
+ * @model
+ * @generated
+ */
+public interface System extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getSystem_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Stakeholders</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn <em>Has Interest In</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Stakeholders</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stakeholders</em>' reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getSystem_Stakeholders()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder#getHasInterestIn
+ * @model opposite="hasInterestIn" required="true"
+ * @generated
+ */
+ EList<Stakeholder> getStakeholders();
+
+ /**
+ * Returns the value of the '<em><b>Exhibits</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn <em>Exhibited In</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Exhibits</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Exhibits</em>' reference.
+ * @see #setExhibits(Architecture)
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#getSystem_Exhibits()
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture#getExhibitedIn
+ * @model opposite="exhibitedIn" required="true"
+ * @generated
+ */
+ Architecture getExhibits();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System#getExhibits <em>Exhibits</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Exhibits</em>' reference.
+ * @see #getExhibits()
+ * @generated
+ */
+ void setExhibits(Architecture value);
+
+} // System
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ADElementImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ADElementImpl.java
new file mode 100755
index 00000000000..a9b03c65a96
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ADElementImpl.java
@@ -0,0 +1,248 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>AD Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ADElementImpl#getAffectedBy <em>Affected By</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ADElementImpl extends MinimalEObjectImpl.Container implements ADElement {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getAffectedBy() <em>Affected By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAffectedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> affectedBy;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ADElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.AD_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.AD_ELEMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getAffectedBy() {
+ if (affectedBy == null) {
+ affectedBy = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.AD_ELEMENT__AFFECTED_BY, Iso42010Package.ARCHITECTURE_DECISION__AFFECTS);
+ }
+ return affectedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getAffectedBy()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ return ((InternalEList<?>)getAffectedBy()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__NAME:
+ return getName();
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ return getAffectedBy();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__NAME:
+ setName((String)newValue);
+ return;
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ getAffectedBy().clear();
+ getAffectedBy().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ getAffectedBy().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.AD_ELEMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case Iso42010Package.AD_ELEMENT__AFFECTED_BY:
+ return affectedBy != null && !affectedBy.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ADElementImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDecisionImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDecisionImpl.java
new file mode 100755
index 00000000000..310c93effae
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDecisionImpl.java
@@ -0,0 +1,368 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Decision</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getJustifiedBy <em>Justified By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getDependsUpon <em>Depends Upon</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getDependents <em>Dependents</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getRaises <em>Raises</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getPertainsTo <em>Pertains To</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDecisionImpl#getAffects <em>Affects</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureDecisionImpl extends ADElementImpl implements ArchitectureDecision {
+ /**
+ * The cached value of the '{@link #getJustifiedBy() <em>Justified By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getJustifiedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureRationale> justifiedBy;
+
+ /**
+ * The cached value of the '{@link #getDependsUpon() <em>Depends Upon</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDependsUpon()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> dependsUpon;
+
+ /**
+ * The cached value of the '{@link #getDependents() <em>Dependents</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDependents()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> dependents;
+
+ /**
+ * The cached value of the '{@link #getRaises() <em>Raises</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRaises()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> raises;
+
+ /**
+ * The cached value of the '{@link #getPertainsTo() <em>Pertains To</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPertainsTo()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> pertainsTo;
+
+ /**
+ * The cached value of the '{@link #getAffects() <em>Affects</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAffects()
+ * @generated
+ * @ordered
+ */
+ protected EList<ADElement> affects;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureDecisionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_DECISION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureRationale> getJustifiedBy() {
+ if (justifiedBy == null) {
+ justifiedBy = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureRationale>(ArchitectureRationale.class, this, Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY, Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES);
+ }
+ return justifiedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getDependsUpon() {
+ if (dependsUpon == null) {
+ dependsUpon = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON, Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS);
+ }
+ return dependsUpon;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getDependents() {
+ if (dependents == null) {
+ dependents = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS, Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON);
+ }
+ return dependents;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getRaises() {
+ if (raises == null) {
+ raises = new EObjectWithInverseResolvingEList.ManyInverse<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_DECISION__RAISES, Iso42010Package.CONCERN__RAISED_BY);
+ }
+ return raises;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getPertainsTo() {
+ if (pertainsTo == null) {
+ pertainsTo = new EObjectWithInverseResolvingEList.ManyInverse<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO, Iso42010Package.CONCERN__DECISIONS);
+ }
+ return pertainsTo;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ADElement> getAffects() {
+ if (affects == null) {
+ affects = new EObjectWithInverseResolvingEList.ManyInverse<ADElement>(ADElement.class, this, Iso42010Package.ARCHITECTURE_DECISION__AFFECTS, Iso42010Package.AD_ELEMENT__AFFECTED_BY);
+ }
+ return affects;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getJustifiedBy()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getDependsUpon()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getDependents()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getRaises()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getPertainsTo()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getAffects()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ return ((InternalEList<?>)getJustifiedBy()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ return ((InternalEList<?>)getDependsUpon()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ return ((InternalEList<?>)getDependents()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ return ((InternalEList<?>)getRaises()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ return ((InternalEList<?>)getPertainsTo()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ return ((InternalEList<?>)getAffects()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ return getJustifiedBy();
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ return getDependsUpon();
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ return getDependents();
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ return getRaises();
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ return getPertainsTo();
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ return getAffects();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ getJustifiedBy().clear();
+ getJustifiedBy().addAll((Collection<? extends ArchitectureRationale>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ getDependsUpon().clear();
+ getDependsUpon().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ getDependents().clear();
+ getDependents().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ getRaises().clear();
+ getRaises().addAll((Collection<? extends Concern>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ getPertainsTo().clear();
+ getPertainsTo().addAll((Collection<? extends Concern>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ getAffects().clear();
+ getAffects().addAll((Collection<? extends ADElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ getJustifiedBy().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ getDependsUpon().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ getDependents().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ getRaises().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ getPertainsTo().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ getAffects().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY:
+ return justifiedBy != null && !justifiedBy.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDS_UPON:
+ return dependsUpon != null && !dependsUpon.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DECISION__DEPENDENTS:
+ return dependents != null && !dependents.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DECISION__RAISES:
+ return raises != null && !raises.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO:
+ return pertainsTo != null && !pertainsTo.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DECISION__AFFECTS:
+ return affects != null && !affects.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureDecisionImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDescriptionImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDescriptionImpl.java
new file mode 100755
index 00000000000..ae18388f9e1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureDescriptionImpl.java
@@ -0,0 +1,557 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Description</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getViews <em>Views</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getSystem <em>System</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getExpresses <em>Expresses</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getRationales <em>Rationales</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getCorrespondences <em>Correspondences</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getRules <em>Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureDescriptionImpl#getDecisions <em>Decisions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureDescriptionImpl extends MinimalEObjectImpl.Container implements ArchitectureDescription {
+ /**
+ * The cached value of the '{@link #getStakeholders() <em>Stakeholders</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStakeholders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Stakeholder> stakeholders;
+
+ /**
+ * The cached value of the '{@link #getConcerns() <em>Concerns</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConcerns()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> concerns;
+
+ /**
+ * The cached value of the '{@link #getViewpoints() <em>Viewpoints</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewpoints()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureViewpoint> viewpoints;
+
+ /**
+ * The cached value of the '{@link #getViews() <em>Views</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViews()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureView> views;
+
+ /**
+ * The cached value of the '{@link #getSystem() <em>System</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSystem()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.papyrus.infra.viewpoints.iso42010.System system;
+
+ /**
+ * The cached value of the '{@link #getExpresses() <em>Expresses</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpresses()
+ * @generated
+ * @ordered
+ */
+ protected Architecture expresses;
+
+ /**
+ * The cached value of the '{@link #getRationales() <em>Rationales</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRationales()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureRationale> rationales;
+
+ /**
+ * The cached value of the '{@link #getCorrespondences() <em>Correspondences</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCorrespondences()
+ * @generated
+ * @ordered
+ */
+ protected EList<Correspondence> correspondences;
+
+ /**
+ * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<CorrespondenceRule> rules;
+
+ /**
+ * The cached value of the '{@link #getDecisions() <em>Decisions</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDecisions()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> decisions;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureDescriptionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Stakeholder> getStakeholders() {
+ if (stakeholders == null) {
+ stakeholders = new EObjectContainmentEList<Stakeholder>(Stakeholder.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS);
+ }
+ return stakeholders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getConcerns() {
+ if (concerns == null) {
+ concerns = new EObjectContainmentEList<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS);
+ }
+ return concerns;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureViewpoint> getViewpoints() {
+ if (viewpoints == null) {
+ viewpoints = new EObjectContainmentEList<ArchitectureViewpoint>(ArchitectureViewpoint.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS);
+ }
+ return viewpoints;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureView> getViews() {
+ if (views == null) {
+ views = new EObjectContainmentEList<ArchitectureView>(ArchitectureView.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS);
+ }
+ return views;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System getSystem() {
+ return system;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System newSystem, NotificationChain msgs) {
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System oldSystem = system;
+ system = newSystem;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM, oldSystem, newSystem);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System newSystem) {
+ if (newSystem != system) {
+ NotificationChain msgs = null;
+ if (system != null)
+ msgs = ((InternalEObject)system).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM, null, msgs);
+ if (newSystem != null)
+ msgs = ((InternalEObject)newSystem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM, null, msgs);
+ msgs = basicSetSystem(newSystem, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM, newSystem, newSystem));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Architecture getExpresses() {
+ return expresses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpresses(Architecture newExpresses, NotificationChain msgs) {
+ Architecture oldExpresses = expresses;
+ expresses = newExpresses;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES, oldExpresses, newExpresses);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpresses(Architecture newExpresses) {
+ if (newExpresses != expresses) {
+ NotificationChain msgs = null;
+ if (expresses != null)
+ msgs = ((InternalEObject)expresses).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES, null, msgs);
+ if (newExpresses != null)
+ msgs = ((InternalEObject)newExpresses).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES, null, msgs);
+ msgs = basicSetExpresses(newExpresses, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES, newExpresses, newExpresses));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureRationale> getRationales() {
+ if (rationales == null) {
+ rationales = new EObjectContainmentEList<ArchitectureRationale>(ArchitectureRationale.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES);
+ }
+ return rationales;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Correspondence> getCorrespondences() {
+ if (correspondences == null) {
+ correspondences = new EObjectContainmentEList<Correspondence>(Correspondence.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES);
+ }
+ return correspondences;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<CorrespondenceRule> getRules() {
+ if (rules == null) {
+ rules = new EObjectContainmentEList<CorrespondenceRule>(CorrespondenceRule.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES);
+ }
+ return rules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getDecisions() {
+ if (decisions == null) {
+ decisions = new EObjectContainmentEList<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS);
+ }
+ return decisions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ return ((InternalEList<?>)getStakeholders()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ return ((InternalEList<?>)getConcerns()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ return ((InternalEList<?>)getViewpoints()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ return ((InternalEList<?>)getViews()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ return basicSetSystem(null, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ return basicSetExpresses(null, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ return ((InternalEList<?>)getRationales()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ return ((InternalEList<?>)getCorrespondences()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ return ((InternalEList<?>)getRules()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ return ((InternalEList<?>)getDecisions()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ return getStakeholders();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ return getConcerns();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ return getViewpoints();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ return getViews();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ return getSystem();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ return getExpresses();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ return getRationales();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ return getCorrespondences();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ return getRules();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ return getDecisions();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ getStakeholders().clear();
+ getStakeholders().addAll((Collection<? extends Stakeholder>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ getConcerns().clear();
+ getConcerns().addAll((Collection<? extends Concern>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ getViewpoints().clear();
+ getViewpoints().addAll((Collection<? extends ArchitectureViewpoint>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ getViews().clear();
+ getViews().addAll((Collection<? extends ArchitectureView>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ setSystem((org.eclipse.papyrus.infra.viewpoints.iso42010.System)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ setExpresses((Architecture)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ getRationales().clear();
+ getRationales().addAll((Collection<? extends ArchitectureRationale>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ getCorrespondences().clear();
+ getCorrespondences().addAll((Collection<? extends Correspondence>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ getRules().clear();
+ getRules().addAll((Collection<? extends CorrespondenceRule>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ getDecisions().clear();
+ getDecisions().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ getStakeholders().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ getConcerns().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ getViewpoints().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ getViews().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ setSystem((org.eclipse.papyrus.infra.viewpoints.iso42010.System)null);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ setExpresses((Architecture)null);
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ getRationales().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ getCorrespondences().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ getRules().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ getDecisions().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__STAKEHOLDERS:
+ return stakeholders != null && !stakeholders.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CONCERNS:
+ return concerns != null && !concerns.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWPOINTS:
+ return viewpoints != null && !viewpoints.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__VIEWS:
+ return views != null && !views.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__SYSTEM:
+ return system != null;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__EXPRESSES:
+ return expresses != null;
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RATIONALES:
+ return rationales != null && !rationales.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__CORRESPONDENCES:
+ return correspondences != null && !correspondences.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__RULES:
+ return rules != null && !rules.isEmpty();
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION__DECISIONS:
+ return decisions != null && !decisions.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureDescriptionImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureFrameworkImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureFrameworkImpl.java
new file mode 100755
index 00000000000..c8e79a51472
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureFrameworkImpl.java
@@ -0,0 +1,274 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Framework</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl#getRules <em>Rules</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkImpl#getConcerns <em>Concerns</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureFrameworkImpl extends MinimalEObjectImpl.Container implements ArchitectureFramework {
+ /**
+ * The cached value of the '{@link #getStakeholders() <em>Stakeholders</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStakeholders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Stakeholder> stakeholders;
+
+ /**
+ * The cached value of the '{@link #getViewpoints() <em>Viewpoints</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewpoints()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureViewpoint> viewpoints;
+
+ /**
+ * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<CorrespondenceRule> rules;
+
+ /**
+ * The cached value of the '{@link #getConcerns() <em>Concerns</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConcerns()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> concerns;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureFrameworkImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Stakeholder> getStakeholders() {
+ if (stakeholders == null) {
+ stakeholders = new EObjectContainmentEList<Stakeholder>(Stakeholder.class, this, Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS);
+ }
+ return stakeholders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureViewpoint> getViewpoints() {
+ if (viewpoints == null) {
+ viewpoints = new EObjectContainmentEList<ArchitectureViewpoint>(ArchitectureViewpoint.class, this, Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS);
+ }
+ return viewpoints;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<CorrespondenceRule> getRules() {
+ if (rules == null) {
+ rules = new EObjectContainmentEList<CorrespondenceRule>(CorrespondenceRule.class, this, Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES);
+ }
+ return rules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getConcerns() {
+ if (concerns == null) {
+ concerns = new EObjectContainmentEList<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS);
+ }
+ return concerns;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ return ((InternalEList<?>)getStakeholders()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ return ((InternalEList<?>)getViewpoints()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ return ((InternalEList<?>)getRules()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ return ((InternalEList<?>)getConcerns()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ return getStakeholders();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ return getViewpoints();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ return getRules();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ return getConcerns();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ getStakeholders().clear();
+ getStakeholders().addAll((Collection<? extends Stakeholder>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ getViewpoints().clear();
+ getViewpoints().addAll((Collection<? extends ArchitectureViewpoint>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ getRules().clear();
+ getRules().addAll((Collection<? extends CorrespondenceRule>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ getConcerns().clear();
+ getConcerns().addAll((Collection<? extends Concern>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ getStakeholders().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ getViewpoints().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ getRules().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ getConcerns().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS:
+ return stakeholders != null && !stakeholders.isEmpty();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__VIEWPOINTS:
+ return viewpoints != null && !viewpoints.isEmpty();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__RULES:
+ return rules != null && !rules.isEmpty();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK__CONCERNS:
+ return concerns != null && !concerns.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureFrameworkImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureImpl.java
new file mode 100755
index 00000000000..882593422e1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureImpl.java
@@ -0,0 +1,220 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureImpl#getExhibitedIn <em>Exhibited In</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureImpl extends MinimalEObjectImpl.Container implements Architecture {
+ /**
+ * The cached value of the '{@link #getExhibitedIn() <em>Exhibited In</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExhibitedIn()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.papyrus.infra.viewpoints.iso42010.System exhibitedIn;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System getExhibitedIn() {
+ if (exhibitedIn != null && exhibitedIn.eIsProxy()) {
+ InternalEObject oldExhibitedIn = (InternalEObject)exhibitedIn;
+ exhibitedIn = (org.eclipse.papyrus.infra.viewpoints.iso42010.System)eResolveProxy(oldExhibitedIn);
+ if (exhibitedIn != oldExhibitedIn) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, oldExhibitedIn, exhibitedIn));
+ }
+ }
+ return exhibitedIn;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System basicGetExhibitedIn() {
+ return exhibitedIn;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExhibitedIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System newExhibitedIn, NotificationChain msgs) {
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System oldExhibitedIn = exhibitedIn;
+ exhibitedIn = newExhibitedIn;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, oldExhibitedIn, newExhibitedIn);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExhibitedIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System newExhibitedIn) {
+ if (newExhibitedIn != exhibitedIn) {
+ NotificationChain msgs = null;
+ if (exhibitedIn != null)
+ msgs = ((InternalEObject)exhibitedIn).eInverseRemove(this, Iso42010Package.SYSTEM__EXHIBITS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ if (newExhibitedIn != null)
+ msgs = ((InternalEObject)newExhibitedIn).eInverseAdd(this, Iso42010Package.SYSTEM__EXHIBITS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ msgs = basicSetExhibitedIn(newExhibitedIn, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, newExhibitedIn, newExhibitedIn));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ if (exhibitedIn != null)
+ msgs = ((InternalEObject)exhibitedIn).eInverseRemove(this, Iso42010Package.SYSTEM__EXHIBITS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ return basicSetExhibitedIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ return basicSetExhibitedIn(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ if (resolve) return getExhibitedIn();
+ return basicGetExhibitedIn();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ setExhibitedIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ setExhibitedIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE__EXHIBITED_IN:
+ return exhibitedIn != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureModelImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureModelImpl.java
new file mode 100755
index 00000000000..ccfef1fdb2b
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureModelImpl.java
@@ -0,0 +1,295 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Model</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureModelImpl#getView <em>View</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureModelImpl extends ADElementImpl implements ArchitectureModel {
+ /**
+ * The cached value of the '{@link #getGovernedBy() <em>Governed By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGovernedBy()
+ * @generated
+ * @ordered
+ */
+ protected ModelKind governedBy;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureModelImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_MODEL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelKind getGovernedBy() {
+ if (governedBy != null && governedBy.eIsProxy()) {
+ InternalEObject oldGovernedBy = (InternalEObject)governedBy;
+ governedBy = (ModelKind)eResolveProxy(oldGovernedBy);
+ if (governedBy != oldGovernedBy) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY, oldGovernedBy, governedBy));
+ }
+ }
+ return governedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelKind basicGetGovernedBy() {
+ return governedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGovernedBy(ModelKind newGovernedBy, NotificationChain msgs) {
+ ModelKind oldGovernedBy = governedBy;
+ governedBy = newGovernedBy;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY, oldGovernedBy, newGovernedBy);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGovernedBy(ModelKind newGovernedBy) {
+ if (newGovernedBy != governedBy) {
+ NotificationChain msgs = null;
+ if (governedBy != null)
+ msgs = ((InternalEObject)governedBy).eInverseRemove(this, Iso42010Package.MODEL_KIND__GOVERNS, ModelKind.class, msgs);
+ if (newGovernedBy != null)
+ msgs = ((InternalEObject)newGovernedBy).eInverseAdd(this, Iso42010Package.MODEL_KIND__GOVERNS, ModelKind.class, msgs);
+ msgs = basicSetGovernedBy(newGovernedBy, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY, newGovernedBy, newGovernedBy));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureView getView() {
+ if (eContainerFeatureID() != Iso42010Package.ARCHITECTURE_MODEL__VIEW) return null;
+ return (ArchitectureView)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetView(ArchitectureView newView, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newView, Iso42010Package.ARCHITECTURE_MODEL__VIEW, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setView(ArchitectureView newView) {
+ if (newView != eInternalContainer() || (eContainerFeatureID() != Iso42010Package.ARCHITECTURE_MODEL__VIEW && newView != null)) {
+ if (EcoreUtil.isAncestor(this, newView))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newView != null)
+ msgs = ((InternalEObject)newView).eInverseAdd(this, Iso42010Package.ARCHITECTURE_VIEW__MODELS, ArchitectureView.class, msgs);
+ msgs = basicSetView(newView, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_MODEL__VIEW, newView, newView));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ if (governedBy != null)
+ msgs = ((InternalEObject)governedBy).eInverseRemove(this, Iso42010Package.MODEL_KIND__GOVERNS, ModelKind.class, msgs);
+ return basicSetGovernedBy((ModelKind)otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetView((ArchitectureView)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ return basicSetGovernedBy(null, msgs);
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ return basicSetView(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ return eInternalContainer().eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEW__MODELS, ArchitectureView.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ if (resolve) return getGovernedBy();
+ return basicGetGovernedBy();
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ return getView();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ setGovernedBy((ModelKind)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ setView((ArchitectureView)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ setGovernedBy((ModelKind)null);
+ return;
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ setView((ArchitectureView)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY:
+ return governedBy != null;
+ case Iso42010Package.ARCHITECTURE_MODEL__VIEW:
+ return getView() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureModelImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureRationaleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureRationaleImpl.java
new file mode 100755
index 00000000000..00123eaf304
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureRationaleImpl.java
@@ -0,0 +1,176 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Rationale</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureRationaleImpl#getJustifies <em>Justifies</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureRationaleImpl extends ADElementImpl implements ArchitectureRationale {
+ /**
+ * The cached value of the '{@link #getJustifies() <em>Justifies</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getJustifies()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> justifies;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureRationaleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_RATIONALE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getJustifies() {
+ if (justifies == null) {
+ justifies = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES, Iso42010Package.ARCHITECTURE_DECISION__JUSTIFIED_BY);
+ }
+ return justifies;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getJustifies()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ return ((InternalEList<?>)getJustifies()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ return getJustifies();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ getJustifies().clear();
+ getJustifies().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ getJustifies().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_RATIONALE__JUSTIFIES:
+ return justifies != null && !justifies.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureRationaleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewImpl.java
new file mode 100755
index 00000000000..d303d80be2d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewImpl.java
@@ -0,0 +1,308 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture View</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl#getModels <em>Models</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewImpl#getAddresses <em>Addresses</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureViewImpl extends ADElementImpl implements ArchitectureView {
+ /**
+ * The cached value of the '{@link #getGovernedBy() <em>Governed By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGovernedBy()
+ * @generated
+ * @ordered
+ */
+ protected ArchitectureViewpoint governedBy;
+
+ /**
+ * The cached value of the '{@link #getModels() <em>Models</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getModels()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureModel> models;
+
+ /**
+ * The cached value of the '{@link #getAddresses() <em>Addresses</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddresses()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> addresses;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureViewImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_VIEW;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewpoint getGovernedBy() {
+ if (governedBy != null && governedBy.eIsProxy()) {
+ InternalEObject oldGovernedBy = (InternalEObject)governedBy;
+ governedBy = (ArchitectureViewpoint)eResolveProxy(oldGovernedBy);
+ if (governedBy != oldGovernedBy) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, oldGovernedBy, governedBy));
+ }
+ }
+ return governedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewpoint basicGetGovernedBy() {
+ return governedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGovernedBy(ArchitectureViewpoint newGovernedBy, NotificationChain msgs) {
+ ArchitectureViewpoint oldGovernedBy = governedBy;
+ governedBy = newGovernedBy;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, oldGovernedBy, newGovernedBy);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGovernedBy(ArchitectureViewpoint newGovernedBy) {
+ if (newGovernedBy != governedBy) {
+ NotificationChain msgs = null;
+ if (governedBy != null)
+ msgs = ((InternalEObject)governedBy).eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, ArchitectureViewpoint.class, msgs);
+ if (newGovernedBy != null)
+ msgs = ((InternalEObject)newGovernedBy).eInverseAdd(this, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, ArchitectureViewpoint.class, msgs);
+ msgs = basicSetGovernedBy(newGovernedBy, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, newGovernedBy, newGovernedBy));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureModel> getModels() {
+ if (models == null) {
+ models = new EObjectContainmentWithInverseEList<ArchitectureModel>(ArchitectureModel.class, this, Iso42010Package.ARCHITECTURE_VIEW__MODELS, Iso42010Package.ARCHITECTURE_MODEL__VIEW);
+ }
+ return models;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getAddresses() {
+ if (addresses == null) {
+ addresses = new EObjectWithInverseResolvingEList.ManyInverse<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES, Iso42010Package.CONCERN__ADDRESSED_BY);
+ }
+ return addresses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ if (governedBy != null)
+ msgs = ((InternalEObject)governedBy).eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, ArchitectureViewpoint.class, msgs);
+ return basicSetGovernedBy((ArchitectureViewpoint)otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getModels()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getAddresses()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ return basicSetGovernedBy(null, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ return ((InternalEList<?>)getModels()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ return ((InternalEList<?>)getAddresses()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ if (resolve) return getGovernedBy();
+ return basicGetGovernedBy();
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ return getModels();
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ return getAddresses();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ setGovernedBy((ArchitectureViewpoint)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ getModels().clear();
+ getModels().addAll((Collection<? extends ArchitectureModel>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ getAddresses().clear();
+ getAddresses().addAll((Collection<? extends Concern>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ setGovernedBy((ArchitectureViewpoint)null);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ getModels().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ getAddresses().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY:
+ return governedBy != null;
+ case Iso42010Package.ARCHITECTURE_VIEW__MODELS:
+ return models != null && !models.isEmpty();
+ case Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES:
+ return addresses != null && !addresses.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureViewImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewpointImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewpointImpl.java
new file mode 100755
index 00000000000..83709b8811f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ArchitectureViewpointImpl.java
@@ -0,0 +1,308 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Architecture Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl#getModelKinds <em>Model Kinds</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl#getGoverns <em>Governs</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointImpl#getFrames <em>Frames</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ArchitectureViewpointImpl extends ADElementImpl implements ArchitectureViewpoint {
+ /**
+ * The cached value of the '{@link #getModelKinds() <em>Model Kinds</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getModelKinds()
+ * @generated
+ * @ordered
+ */
+ protected EList<ModelKind> modelKinds;
+
+ /**
+ * The cached value of the '{@link #getGoverns() <em>Governs</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGoverns()
+ * @generated
+ * @ordered
+ */
+ protected ArchitectureView governs;
+
+ /**
+ * The cached value of the '{@link #getFrames() <em>Frames</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFrames()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> frames;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ArchitectureViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ModelKind> getModelKinds() {
+ if (modelKinds == null) {
+ modelKinds = new EObjectContainmentWithInverseEList<ModelKind>(ModelKind.class, this, Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS, Iso42010Package.MODEL_KIND__VIEWPOINT);
+ }
+ return modelKinds;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureView getGoverns() {
+ if (governs != null && governs.eIsProxy()) {
+ InternalEObject oldGoverns = (InternalEObject)governs;
+ governs = (ArchitectureView)eResolveProxy(oldGoverns);
+ if (governs != oldGoverns) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, oldGoverns, governs));
+ }
+ }
+ return governs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureView basicGetGoverns() {
+ return governs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGoverns(ArchitectureView newGoverns, NotificationChain msgs) {
+ ArchitectureView oldGoverns = governs;
+ governs = newGoverns;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, oldGoverns, newGoverns);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGoverns(ArchitectureView newGoverns) {
+ if (newGoverns != governs) {
+ NotificationChain msgs = null;
+ if (governs != null)
+ msgs = ((InternalEObject)governs).eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, ArchitectureView.class, msgs);
+ if (newGoverns != null)
+ msgs = ((InternalEObject)newGoverns).eInverseAdd(this, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, ArchitectureView.class, msgs);
+ msgs = basicSetGoverns(newGoverns, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS, newGoverns, newGoverns));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getFrames() {
+ if (frames == null) {
+ frames = new EObjectWithInverseResolvingEList.ManyInverse<Concern>(Concern.class, this, Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES, Iso42010Package.CONCERN__FRAMED_BY);
+ }
+ return frames;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getModelKinds()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ if (governs != null)
+ msgs = ((InternalEObject)governs).eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEW__GOVERNED_BY, ArchitectureView.class, msgs);
+ return basicSetGoverns((ArchitectureView)otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getFrames()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ return ((InternalEList<?>)getModelKinds()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ return basicSetGoverns(null, msgs);
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ return ((InternalEList<?>)getFrames()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ return getModelKinds();
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ if (resolve) return getGoverns();
+ return basicGetGoverns();
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ return getFrames();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ getModelKinds().clear();
+ getModelKinds().addAll((Collection<? extends ModelKind>)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ setGoverns((ArchitectureView)newValue);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ getFrames().clear();
+ getFrames().addAll((Collection<? extends Concern>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ getModelKinds().clear();
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ setGoverns((ArchitectureView)null);
+ return;
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ getFrames().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS:
+ return modelKinds != null && !modelKinds.isEmpty();
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__GOVERNS:
+ return governs != null;
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES:
+ return frames != null && !frames.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ArchitectureViewpointImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ConcernImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ConcernImpl.java
new file mode 100755
index 00000000000..62f08f92eae
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ConcernImpl.java
@@ -0,0 +1,331 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Concern</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl#getFramedBy <em>Framed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl#getAddressedBy <em>Addressed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl#getRaisedBy <em>Raised By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ConcernImpl#getDecisions <em>Decisions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConcernImpl extends ADElementImpl implements Concern {
+ /**
+ * The cached value of the '{@link #getFramedBy() <em>Framed By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFramedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureViewpoint> framedBy;
+
+ /**
+ * The cached value of the '{@link #getAddressedBy() <em>Addressed By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddressedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureView> addressedBy;
+
+ /**
+ * The cached value of the '{@link #getStakeholders() <em>Stakeholders</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStakeholders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Stakeholder> stakeholders;
+
+ /**
+ * The cached value of the '{@link #getRaisedBy() <em>Raised By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRaisedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> raisedBy;
+
+ /**
+ * The cached value of the '{@link #getDecisions() <em>Decisions</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDecisions()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureDecision> decisions;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConcernImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.CONCERN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureViewpoint> getFramedBy() {
+ if (framedBy == null) {
+ framedBy = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureViewpoint>(ArchitectureViewpoint.class, this, Iso42010Package.CONCERN__FRAMED_BY, Iso42010Package.ARCHITECTURE_VIEWPOINT__FRAMES);
+ }
+ return framedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureView> getAddressedBy() {
+ if (addressedBy == null) {
+ addressedBy = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureView>(ArchitectureView.class, this, Iso42010Package.CONCERN__ADDRESSED_BY, Iso42010Package.ARCHITECTURE_VIEW__ADDRESSES);
+ }
+ return addressedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Stakeholder> getStakeholders() {
+ if (stakeholders == null) {
+ stakeholders = new EObjectWithInverseResolvingEList.ManyInverse<Stakeholder>(Stakeholder.class, this, Iso42010Package.CONCERN__STAKEHOLDERS, Iso42010Package.STAKEHOLDER__CONCERNS);
+ }
+ return stakeholders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getRaisedBy() {
+ if (raisedBy == null) {
+ raisedBy = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.CONCERN__RAISED_BY, Iso42010Package.ARCHITECTURE_DECISION__RAISES);
+ }
+ return raisedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureDecision> getDecisions() {
+ if (decisions == null) {
+ decisions = new EObjectWithInverseResolvingEList.ManyInverse<ArchitectureDecision>(ArchitectureDecision.class, this, Iso42010Package.CONCERN__DECISIONS, Iso42010Package.ARCHITECTURE_DECISION__PERTAINS_TO);
+ }
+ return decisions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getFramedBy()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getAddressedBy()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getStakeholders()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.CONCERN__RAISED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getRaisedBy()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.CONCERN__DECISIONS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getDecisions()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ return ((InternalEList<?>)getFramedBy()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ return ((InternalEList<?>)getAddressedBy()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ return ((InternalEList<?>)getStakeholders()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.CONCERN__RAISED_BY:
+ return ((InternalEList<?>)getRaisedBy()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.CONCERN__DECISIONS:
+ return ((InternalEList<?>)getDecisions()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ return getFramedBy();
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ return getAddressedBy();
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ return getStakeholders();
+ case Iso42010Package.CONCERN__RAISED_BY:
+ return getRaisedBy();
+ case Iso42010Package.CONCERN__DECISIONS:
+ return getDecisions();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ getFramedBy().clear();
+ getFramedBy().addAll((Collection<? extends ArchitectureViewpoint>)newValue);
+ return;
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ getAddressedBy().clear();
+ getAddressedBy().addAll((Collection<? extends ArchitectureView>)newValue);
+ return;
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ getStakeholders().clear();
+ getStakeholders().addAll((Collection<? extends Stakeholder>)newValue);
+ return;
+ case Iso42010Package.CONCERN__RAISED_BY:
+ getRaisedBy().clear();
+ getRaisedBy().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ case Iso42010Package.CONCERN__DECISIONS:
+ getDecisions().clear();
+ getDecisions().addAll((Collection<? extends ArchitectureDecision>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ getFramedBy().clear();
+ return;
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ getAddressedBy().clear();
+ return;
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ getStakeholders().clear();
+ return;
+ case Iso42010Package.CONCERN__RAISED_BY:
+ getRaisedBy().clear();
+ return;
+ case Iso42010Package.CONCERN__DECISIONS:
+ getDecisions().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CONCERN__FRAMED_BY:
+ return framedBy != null && !framedBy.isEmpty();
+ case Iso42010Package.CONCERN__ADDRESSED_BY:
+ return addressedBy != null && !addressedBy.isEmpty();
+ case Iso42010Package.CONCERN__STAKEHOLDERS:
+ return stakeholders != null && !stakeholders.isEmpty();
+ case Iso42010Package.CONCERN__RAISED_BY:
+ return raisedBy != null && !raisedBy.isEmpty();
+ case Iso42010Package.CONCERN__DECISIONS:
+ return decisions != null && !decisions.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ConcernImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceImpl.java
new file mode 100755
index 00000000000..a6ba74d90f6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceImpl.java
@@ -0,0 +1,214 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Correspondence</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl#getGovernedBy <em>Governed By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceImpl#getRelates <em>Relates</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CorrespondenceImpl extends MinimalEObjectImpl.Container implements Correspondence {
+ /**
+ * The cached value of the '{@link #getGovernedBy() <em>Governed By</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGovernedBy()
+ * @generated
+ * @ordered
+ */
+ protected EList<CorrespondenceRule> governedBy;
+
+ /**
+ * The cached value of the '{@link #getRelates() <em>Relates</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRelates()
+ * @generated
+ * @ordered
+ */
+ protected EList<ADElement> relates;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CorrespondenceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.CORRESPONDENCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<CorrespondenceRule> getGovernedBy() {
+ if (governedBy == null) {
+ governedBy = new EObjectWithInverseResolvingEList.ManyInverse<CorrespondenceRule>(CorrespondenceRule.class, this, Iso42010Package.CORRESPONDENCE__GOVERNED_BY, Iso42010Package.CORRESPONDENCE_RULE__GOVERNS);
+ }
+ return governedBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ADElement> getRelates() {
+ if (relates == null) {
+ relates = new EObjectResolvingEList<ADElement>(ADElement.class, this, Iso42010Package.CORRESPONDENCE__RELATES);
+ }
+ return relates;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getGovernedBy()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ return ((InternalEList<?>)getGovernedBy()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ return getGovernedBy();
+ case Iso42010Package.CORRESPONDENCE__RELATES:
+ return getRelates();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ getGovernedBy().clear();
+ getGovernedBy().addAll((Collection<? extends CorrespondenceRule>)newValue);
+ return;
+ case Iso42010Package.CORRESPONDENCE__RELATES:
+ getRelates().clear();
+ getRelates().addAll((Collection<? extends ADElement>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ getGovernedBy().clear();
+ return;
+ case Iso42010Package.CORRESPONDENCE__RELATES:
+ getRelates().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE__GOVERNED_BY:
+ return governedBy != null && !governedBy.isEmpty();
+ case Iso42010Package.CORRESPONDENCE__RELATES:
+ return relates != null && !relates.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //CorrespondenceImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceRuleImpl.java
new file mode 100755
index 00000000000..83fb9a77540
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/CorrespondenceRuleImpl.java
@@ -0,0 +1,178 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Correspondence Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.CorrespondenceRuleImpl#getGoverns <em>Governs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CorrespondenceRuleImpl extends MinimalEObjectImpl.Container implements CorrespondenceRule {
+ /**
+ * The cached value of the '{@link #getGoverns() <em>Governs</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGoverns()
+ * @generated
+ * @ordered
+ */
+ protected EList<Correspondence> governs;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CorrespondenceRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.CORRESPONDENCE_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Correspondence> getGoverns() {
+ if (governs == null) {
+ governs = new EObjectWithInverseResolvingEList.ManyInverse<Correspondence>(Correspondence.class, this, Iso42010Package.CORRESPONDENCE_RULE__GOVERNS, Iso42010Package.CORRESPONDENCE__GOVERNED_BY);
+ }
+ return governs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getGoverns()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ return ((InternalEList<?>)getGoverns()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ return getGoverns();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ getGoverns().clear();
+ getGoverns().addAll((Collection<? extends Correspondence>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ getGoverns().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.CORRESPONDENCE_RULE__GOVERNS:
+ return governs != null && !governs.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //CorrespondenceRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010FactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010FactoryImpl.java
new file mode 100755
index 00000000000..66fc98e6021
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010FactoryImpl.java
@@ -0,0 +1,263 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Iso42010FactoryImpl extends EFactoryImpl implements Iso42010Factory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Iso42010Factory init() {
+ try {
+ Iso42010Factory theIso42010Factory = (Iso42010Factory)EPackage.Registry.INSTANCE.getEFactory(Iso42010Package.eNS_URI);
+ if (theIso42010Factory != null) {
+ return theIso42010Factory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new Iso42010FactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010FactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION: return createArchitectureDescription();
+ case Iso42010Package.STAKEHOLDER: return createStakeholder();
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT: return createArchitectureViewpoint();
+ case Iso42010Package.MODEL_KIND: return createModelKind();
+ case Iso42010Package.ARCHITECTURE_MODEL: return createArchitectureModel();
+ case Iso42010Package.ARCHITECTURE_VIEW: return createArchitectureView();
+ case Iso42010Package.CONCERN: return createConcern();
+ case Iso42010Package.SYSTEM: return createSystem();
+ case Iso42010Package.ARCHITECTURE: return createArchitecture();
+ case Iso42010Package.ARCHITECTURE_RATIONALE: return createArchitectureRationale();
+ case Iso42010Package.CORRESPONDENCE: return createCorrespondence();
+ case Iso42010Package.CORRESPONDENCE_RULE: return createCorrespondenceRule();
+ case Iso42010Package.ARCHITECTURE_DECISION: return createArchitectureDecision();
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK: return createArchitectureFramework();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureDescription createArchitectureDescription() {
+ ArchitectureDescriptionImpl architectureDescription = new ArchitectureDescriptionImpl();
+ return architectureDescription;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Stakeholder createStakeholder() {
+ StakeholderImpl stakeholder = new StakeholderImpl();
+ return stakeholder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewpoint createArchitectureViewpoint() {
+ ArchitectureViewpointImpl architectureViewpoint = new ArchitectureViewpointImpl();
+ return architectureViewpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelKind createModelKind() {
+ ModelKindImpl modelKind = new ModelKindImpl();
+ return modelKind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureModel createArchitectureModel() {
+ ArchitectureModelImpl architectureModel = new ArchitectureModelImpl();
+ return architectureModel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureView createArchitectureView() {
+ ArchitectureViewImpl architectureView = new ArchitectureViewImpl();
+ return architectureView;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Concern createConcern() {
+ ConcernImpl concern = new ConcernImpl();
+ return concern;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System createSystem() {
+ SystemImpl system = new SystemImpl();
+ return system;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Architecture createArchitecture() {
+ ArchitectureImpl architecture = new ArchitectureImpl();
+ return architecture;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureRationale createArchitectureRationale() {
+ ArchitectureRationaleImpl architectureRationale = new ArchitectureRationaleImpl();
+ return architectureRationale;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Correspondence createCorrespondence() {
+ CorrespondenceImpl correspondence = new CorrespondenceImpl();
+ return correspondence;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CorrespondenceRule createCorrespondenceRule() {
+ CorrespondenceRuleImpl correspondenceRule = new CorrespondenceRuleImpl();
+ return correspondenceRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureDecision createArchitectureDecision() {
+ ArchitectureDecisionImpl architectureDecision = new ArchitectureDecisionImpl();
+ return architectureDecision;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureFramework createArchitectureFramework() {
+ ArchitectureFrameworkImpl architectureFramework = new ArchitectureFrameworkImpl();
+ return architectureFramework;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010Package getIso42010Package() {
+ return (Iso42010Package)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static Iso42010Package getPackage() {
+ return Iso42010Package.eINSTANCE;
+ }
+
+} //Iso42010FactoryImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010PackageImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010PackageImpl.java
new file mode 100755
index 00000000000..dcc0b479c99
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/Iso42010PackageImpl.java
@@ -0,0 +1,1007 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Factory;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Iso42010PackageImpl extends EPackageImpl implements Iso42010Package {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass adElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureDescriptionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stakeholderEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureViewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelKindEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureModelEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureViewEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass concernEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass systemEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureRationaleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass correspondenceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass correspondenceRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureDecisionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass architectureFrameworkEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private Iso42010PackageImpl() {
+ super(eNS_URI, Iso42010Factory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link Iso42010Package#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static Iso42010Package init() {
+ if (isInited) return (Iso42010Package)EPackage.Registry.INSTANCE.getEPackage(Iso42010Package.eNS_URI);
+
+ // Obtain or create and register package
+ Iso42010PackageImpl theIso42010Package = (Iso42010PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Iso42010PackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Iso42010PackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theIso42010Package.createPackageContents();
+
+ // Initialize created meta-data
+ theIso42010Package.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theIso42010Package.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(Iso42010Package.eNS_URI, theIso42010Package);
+ return theIso42010Package;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getADElement() {
+ return adElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getADElement_Name() {
+ return (EAttribute)adElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getADElement_AffectedBy() {
+ return (EReference)adElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureDescription() {
+ return architectureDescriptionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Stakeholders() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Concerns() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Viewpoints() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Views() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_System() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Expresses() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Rationales() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Correspondences() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Rules() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDescription_Decisions() {
+ return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(9);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStakeholder() {
+ return stakeholderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStakeholder_Concerns() {
+ return (EReference)stakeholderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStakeholder_Viewpoints() {
+ return (EReference)stakeholderEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStakeholder_HasInterestIn() {
+ return (EReference)stakeholderEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureViewpoint() {
+ return architectureViewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureViewpoint_ModelKinds() {
+ return (EReference)architectureViewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureViewpoint_Governs() {
+ return (EReference)architectureViewpointEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureViewpoint_Frames() {
+ return (EReference)architectureViewpointEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModelKind() {
+ return modelKindEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelKind_Governs() {
+ return (EReference)modelKindEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelKind_Viewpoint() {
+ return (EReference)modelKindEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureModel() {
+ return architectureModelEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureModel_GovernedBy() {
+ return (EReference)architectureModelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureModel_View() {
+ return (EReference)architectureModelEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureView() {
+ return architectureViewEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureView_GovernedBy() {
+ return (EReference)architectureViewEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureView_Models() {
+ return (EReference)architectureViewEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureView_Addresses() {
+ return (EReference)architectureViewEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getConcern() {
+ return concernEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConcern_FramedBy() {
+ return (EReference)concernEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConcern_AddressedBy() {
+ return (EReference)concernEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConcern_Stakeholders() {
+ return (EReference)concernEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConcern_RaisedBy() {
+ return (EReference)concernEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConcern_Decisions() {
+ return (EReference)concernEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSystem() {
+ return systemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSystem_Name() {
+ return (EAttribute)systemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSystem_Stakeholders() {
+ return (EReference)systemEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSystem_Exhibits() {
+ return (EReference)systemEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitecture() {
+ return architectureEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitecture_ExhibitedIn() {
+ return (EReference)architectureEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureRationale() {
+ return architectureRationaleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureRationale_Justifies() {
+ return (EReference)architectureRationaleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCorrespondence() {
+ return correspondenceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCorrespondence_GovernedBy() {
+ return (EReference)correspondenceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCorrespondence_Relates() {
+ return (EReference)correspondenceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCorrespondenceRule() {
+ return correspondenceRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCorrespondenceRule_Governs() {
+ return (EReference)correspondenceRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureDecision() {
+ return architectureDecisionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_JustifiedBy() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_DependsUpon() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_Dependents() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_Raises() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_PertainsTo() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureDecision_Affects() {
+ return (EReference)architectureDecisionEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getArchitectureFramework() {
+ return architectureFrameworkEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureFramework_Stakeholders() {
+ return (EReference)architectureFrameworkEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureFramework_Viewpoints() {
+ return (EReference)architectureFrameworkEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureFramework_Rules() {
+ return (EReference)architectureFrameworkEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getArchitectureFramework_Concerns() {
+ return (EReference)architectureFrameworkEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010Factory getIso42010Factory() {
+ return (Iso42010Factory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ adElementEClass = createEClass(AD_ELEMENT);
+ createEAttribute(adElementEClass, AD_ELEMENT__NAME);
+ createEReference(adElementEClass, AD_ELEMENT__AFFECTED_BY);
+
+ architectureDescriptionEClass = createEClass(ARCHITECTURE_DESCRIPTION);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__STAKEHOLDERS);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__CONCERNS);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__VIEWPOINTS);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__VIEWS);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__SYSTEM);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__EXPRESSES);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__RATIONALES);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__CORRESPONDENCES);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__RULES);
+ createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__DECISIONS);
+
+ stakeholderEClass = createEClass(STAKEHOLDER);
+ createEReference(stakeholderEClass, STAKEHOLDER__CONCERNS);
+ createEReference(stakeholderEClass, STAKEHOLDER__VIEWPOINTS);
+ createEReference(stakeholderEClass, STAKEHOLDER__HAS_INTEREST_IN);
+
+ architectureViewpointEClass = createEClass(ARCHITECTURE_VIEWPOINT);
+ createEReference(architectureViewpointEClass, ARCHITECTURE_VIEWPOINT__MODEL_KINDS);
+ createEReference(architectureViewpointEClass, ARCHITECTURE_VIEWPOINT__GOVERNS);
+ createEReference(architectureViewpointEClass, ARCHITECTURE_VIEWPOINT__FRAMES);
+
+ modelKindEClass = createEClass(MODEL_KIND);
+ createEReference(modelKindEClass, MODEL_KIND__GOVERNS);
+ createEReference(modelKindEClass, MODEL_KIND__VIEWPOINT);
+
+ architectureModelEClass = createEClass(ARCHITECTURE_MODEL);
+ createEReference(architectureModelEClass, ARCHITECTURE_MODEL__GOVERNED_BY);
+ createEReference(architectureModelEClass, ARCHITECTURE_MODEL__VIEW);
+
+ architectureViewEClass = createEClass(ARCHITECTURE_VIEW);
+ createEReference(architectureViewEClass, ARCHITECTURE_VIEW__GOVERNED_BY);
+ createEReference(architectureViewEClass, ARCHITECTURE_VIEW__MODELS);
+ createEReference(architectureViewEClass, ARCHITECTURE_VIEW__ADDRESSES);
+
+ concernEClass = createEClass(CONCERN);
+ createEReference(concernEClass, CONCERN__FRAMED_BY);
+ createEReference(concernEClass, CONCERN__ADDRESSED_BY);
+ createEReference(concernEClass, CONCERN__STAKEHOLDERS);
+ createEReference(concernEClass, CONCERN__RAISED_BY);
+ createEReference(concernEClass, CONCERN__DECISIONS);
+
+ systemEClass = createEClass(SYSTEM);
+ createEAttribute(systemEClass, SYSTEM__NAME);
+ createEReference(systemEClass, SYSTEM__STAKEHOLDERS);
+ createEReference(systemEClass, SYSTEM__EXHIBITS);
+
+ architectureEClass = createEClass(ARCHITECTURE);
+ createEReference(architectureEClass, ARCHITECTURE__EXHIBITED_IN);
+
+ architectureRationaleEClass = createEClass(ARCHITECTURE_RATIONALE);
+ createEReference(architectureRationaleEClass, ARCHITECTURE_RATIONALE__JUSTIFIES);
+
+ correspondenceEClass = createEClass(CORRESPONDENCE);
+ createEReference(correspondenceEClass, CORRESPONDENCE__GOVERNED_BY);
+ createEReference(correspondenceEClass, CORRESPONDENCE__RELATES);
+
+ correspondenceRuleEClass = createEClass(CORRESPONDENCE_RULE);
+ createEReference(correspondenceRuleEClass, CORRESPONDENCE_RULE__GOVERNS);
+
+ architectureDecisionEClass = createEClass(ARCHITECTURE_DECISION);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__JUSTIFIED_BY);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__DEPENDS_UPON);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__DEPENDENTS);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__RAISES);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__PERTAINS_TO);
+ createEReference(architectureDecisionEClass, ARCHITECTURE_DECISION__AFFECTS);
+
+ architectureFrameworkEClass = createEClass(ARCHITECTURE_FRAMEWORK);
+ createEReference(architectureFrameworkEClass, ARCHITECTURE_FRAMEWORK__STAKEHOLDERS);
+ createEReference(architectureFrameworkEClass, ARCHITECTURE_FRAMEWORK__VIEWPOINTS);
+ createEReference(architectureFrameworkEClass, ARCHITECTURE_FRAMEWORK__RULES);
+ createEReference(architectureFrameworkEClass, ARCHITECTURE_FRAMEWORK__CONCERNS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ stakeholderEClass.getESuperTypes().add(this.getADElement());
+ architectureViewpointEClass.getESuperTypes().add(this.getADElement());
+ modelKindEClass.getESuperTypes().add(this.getADElement());
+ architectureModelEClass.getESuperTypes().add(this.getADElement());
+ architectureViewEClass.getESuperTypes().add(this.getADElement());
+ concernEClass.getESuperTypes().add(this.getADElement());
+ architectureRationaleEClass.getESuperTypes().add(this.getADElement());
+ architectureDecisionEClass.getESuperTypes().add(this.getADElement());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(adElementEClass, ADElement.class, "ADElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getADElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, ADElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getADElement_AffectedBy(), this.getArchitectureDecision(), this.getArchitectureDecision_Affects(), "affectedBy", null, 0, -1, ADElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureDescriptionEClass, ArchitectureDescription.class, "ArchitectureDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureDescription_Stakeholders(), this.getStakeholder(), null, "stakeholders", null, 1, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Concerns(), this.getConcern(), null, "concerns", null, 1, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Viewpoints(), this.getArchitectureViewpoint(), null, "viewpoints", null, 1, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Views(), this.getArchitectureView(), null, "views", null, 1, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_System(), this.getSystem(), null, "system", null, 1, 1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Expresses(), this.getArchitecture(), null, "expresses", null, 1, 1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Rationales(), this.getArchitectureRationale(), null, "rationales", null, 1, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Correspondences(), this.getCorrespondence(), null, "correspondences", null, 0, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Rules(), this.getCorrespondenceRule(), null, "rules", null, 0, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDescription_Decisions(), this.getArchitectureDecision(), null, "decisions", null, 0, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(stakeholderEClass, Stakeholder.class, "Stakeholder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getStakeholder_Concerns(), this.getConcern(), this.getConcern_Stakeholders(), "concerns", null, 1, -1, Stakeholder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStakeholder_Viewpoints(), this.getArchitectureViewpoint(), null, "viewpoints", null, 1, -1, Stakeholder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStakeholder_HasInterestIn(), this.getSystem(), this.getSystem_Stakeholders(), "hasInterestIn", null, 1, 1, Stakeholder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureViewpointEClass, ArchitectureViewpoint.class, "ArchitectureViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureViewpoint_ModelKinds(), this.getModelKind(), this.getModelKind_Viewpoint(), "modelKinds", null, 1, -1, ArchitectureViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureViewpoint_Governs(), this.getArchitectureView(), this.getArchitectureView_GovernedBy(), "governs", null, 1, 1, ArchitectureViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureViewpoint_Frames(), this.getConcern(), this.getConcern_FramedBy(), "frames", null, 1, -1, ArchitectureViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(modelKindEClass, ModelKind.class, "ModelKind", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModelKind_Governs(), this.getArchitectureModel(), this.getArchitectureModel_GovernedBy(), "governs", null, 1, -1, ModelKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModelKind_Viewpoint(), this.getArchitectureViewpoint(), this.getArchitectureViewpoint_ModelKinds(), "viewpoint", null, 1, 1, ModelKind.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureModelEClass, ArchitectureModel.class, "ArchitectureModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureModel_GovernedBy(), this.getModelKind(), this.getModelKind_Governs(), "governedBy", null, 1, 1, ArchitectureModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureModel_View(), this.getArchitectureView(), this.getArchitectureView_Models(), "view", null, 1, 1, ArchitectureModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureViewEClass, ArchitectureView.class, "ArchitectureView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureView_GovernedBy(), this.getArchitectureViewpoint(), this.getArchitectureViewpoint_Governs(), "governedBy", null, 1, 1, ArchitectureView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureView_Models(), this.getArchitectureModel(), this.getArchitectureModel_View(), "models", null, 1, -1, ArchitectureView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureView_Addresses(), this.getConcern(), this.getConcern_AddressedBy(), "addresses", null, 1, -1, ArchitectureView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(concernEClass, Concern.class, "Concern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConcern_FramedBy(), this.getArchitectureViewpoint(), this.getArchitectureViewpoint_Frames(), "framedBy", null, 1, -1, Concern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConcern_AddressedBy(), this.getArchitectureView(), this.getArchitectureView_Addresses(), "addressedBy", null, 1, -1, Concern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConcern_Stakeholders(), this.getStakeholder(), this.getStakeholder_Concerns(), "stakeholders", null, 1, -1, Concern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConcern_RaisedBy(), this.getArchitectureDecision(), this.getArchitectureDecision_Raises(), "raisedBy", null, 0, -1, Concern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConcern_Decisions(), this.getArchitectureDecision(), this.getArchitectureDecision_PertainsTo(), "decisions", null, 0, -1, Concern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(systemEClass, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, "System", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSystem_Name(), ecorePackage.getEString(), "name", null, 1, 1, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSystem_Stakeholders(), this.getStakeholder(), this.getStakeholder_HasInterestIn(), "stakeholders", null, 1, -1, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSystem_Exhibits(), this.getArchitecture(), this.getArchitecture_ExhibitedIn(), "exhibits", null, 1, 1, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureEClass, Architecture.class, "Architecture", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitecture_ExhibitedIn(), this.getSystem(), this.getSystem_Exhibits(), "exhibitedIn", null, 1, 1, Architecture.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureRationaleEClass, ArchitectureRationale.class, "ArchitectureRationale", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureRationale_Justifies(), this.getArchitectureDecision(), this.getArchitectureDecision_JustifiedBy(), "justifies", null, 1, -1, ArchitectureRationale.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(correspondenceEClass, Correspondence.class, "Correspondence", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getCorrespondence_GovernedBy(), this.getCorrespondenceRule(), this.getCorrespondenceRule_Governs(), "governedBy", null, 0, -1, Correspondence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCorrespondence_Relates(), this.getADElement(), null, "relates", null, 2, -1, Correspondence.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(correspondenceRuleEClass, CorrespondenceRule.class, "CorrespondenceRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getCorrespondenceRule_Governs(), this.getCorrespondence(), this.getCorrespondence_GovernedBy(), "governs", null, 1, -1, CorrespondenceRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureDecisionEClass, ArchitectureDecision.class, "ArchitectureDecision", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureDecision_JustifiedBy(), this.getArchitectureRationale(), this.getArchitectureRationale_Justifies(), "justifiedBy", null, 0, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDecision_DependsUpon(), this.getArchitectureDecision(), this.getArchitectureDecision_Dependents(), "dependsUpon", null, 0, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDecision_Dependents(), this.getArchitectureDecision(), this.getArchitectureDecision_DependsUpon(), "dependents", null, 0, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDecision_Raises(), this.getConcern(), this.getConcern_RaisedBy(), "raises", null, 0, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDecision_PertainsTo(), this.getConcern(), this.getConcern_Decisions(), "pertainsTo", null, 1, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureDecision_Affects(), this.getADElement(), this.getADElement_AffectedBy(), "affects", null, 1, -1, ArchitectureDecision.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(architectureFrameworkEClass, ArchitectureFramework.class, "ArchitectureFramework", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getArchitectureFramework_Stakeholders(), this.getStakeholder(), null, "stakeholders", null, 1, -1, ArchitectureFramework.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureFramework_Viewpoints(), this.getArchitectureViewpoint(), null, "viewpoints", null, 1, -1, ArchitectureFramework.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureFramework_Rules(), this.getCorrespondenceRule(), null, "rules", null, 0, -1, ArchitectureFramework.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getArchitectureFramework_Concerns(), this.getConcern(), null, "concerns", null, 1, -1, ArchitectureFramework.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //Iso42010PackageImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ModelKindImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ModelKindImpl.java
new file mode 100755
index 00000000000..cbcf5aaf268
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/ModelKindImpl.java
@@ -0,0 +1,253 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Kind</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl#getGoverns <em>Governs</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl#getViewpoint <em>Viewpoint</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelKindImpl extends ADElementImpl implements ModelKind {
+ /**
+ * The cached value of the '{@link #getGoverns() <em>Governs</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGoverns()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureModel> governs;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelKindImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.MODEL_KIND;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureModel> getGoverns() {
+ if (governs == null) {
+ governs = new EObjectWithInverseResolvingEList<ArchitectureModel>(ArchitectureModel.class, this, Iso42010Package.MODEL_KIND__GOVERNS, Iso42010Package.ARCHITECTURE_MODEL__GOVERNED_BY);
+ }
+ return governs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ArchitectureViewpoint getViewpoint() {
+ if (eContainerFeatureID() != Iso42010Package.MODEL_KIND__VIEWPOINT) return null;
+ return (ArchitectureViewpoint)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetViewpoint(ArchitectureViewpoint newViewpoint, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newViewpoint, Iso42010Package.MODEL_KIND__VIEWPOINT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setViewpoint(ArchitectureViewpoint newViewpoint) {
+ if (newViewpoint != eInternalContainer() || (eContainerFeatureID() != Iso42010Package.MODEL_KIND__VIEWPOINT && newViewpoint != null)) {
+ if (EcoreUtil.isAncestor(this, newViewpoint))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newViewpoint != null)
+ msgs = ((InternalEObject)newViewpoint).eInverseAdd(this, Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS, ArchitectureViewpoint.class, msgs);
+ msgs = basicSetViewpoint(newViewpoint, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.MODEL_KIND__VIEWPOINT, newViewpoint, newViewpoint));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getGoverns()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetViewpoint((ArchitectureViewpoint)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ return ((InternalEList<?>)getGoverns()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ return basicSetViewpoint(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ return eInternalContainer().eInverseRemove(this, Iso42010Package.ARCHITECTURE_VIEWPOINT__MODEL_KINDS, ArchitectureViewpoint.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ return getGoverns();
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ return getViewpoint();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ getGoverns().clear();
+ getGoverns().addAll((Collection<? extends ArchitectureModel>)newValue);
+ return;
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ setViewpoint((ArchitectureViewpoint)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ getGoverns().clear();
+ return;
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ setViewpoint((ArchitectureViewpoint)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.MODEL_KIND__GOVERNS:
+ return governs != null && !governs.isEmpty();
+ case Iso42010Package.MODEL_KIND__VIEWPOINT:
+ return getViewpoint() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ModelKindImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/StakeholderImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/StakeholderImpl.java
new file mode 100755
index 00000000000..88ca1838b96
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/StakeholderImpl.java
@@ -0,0 +1,303 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stakeholder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl#getConcerns <em>Concerns</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl#getViewpoints <em>Viewpoints</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.StakeholderImpl#getHasInterestIn <em>Has Interest In</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StakeholderImpl extends ADElementImpl implements Stakeholder {
+ /**
+ * The cached value of the '{@link #getConcerns() <em>Concerns</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConcerns()
+ * @generated
+ * @ordered
+ */
+ protected EList<Concern> concerns;
+
+ /**
+ * The cached value of the '{@link #getViewpoints() <em>Viewpoints</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewpoints()
+ * @generated
+ * @ordered
+ */
+ protected EList<ArchitectureViewpoint> viewpoints;
+
+ /**
+ * The cached value of the '{@link #getHasInterestIn() <em>Has Interest In</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHasInterestIn()
+ * @generated
+ * @ordered
+ */
+ protected org.eclipse.papyrus.infra.viewpoints.iso42010.System hasInterestIn;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StakeholderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.STAKEHOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Concern> getConcerns() {
+ if (concerns == null) {
+ concerns = new EObjectWithInverseResolvingEList.ManyInverse<Concern>(Concern.class, this, Iso42010Package.STAKEHOLDER__CONCERNS, Iso42010Package.CONCERN__STAKEHOLDERS);
+ }
+ return concerns;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ArchitectureViewpoint> getViewpoints() {
+ if (viewpoints == null) {
+ viewpoints = new EObjectResolvingEList<ArchitectureViewpoint>(ArchitectureViewpoint.class, this, Iso42010Package.STAKEHOLDER__VIEWPOINTS);
+ }
+ return viewpoints;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System getHasInterestIn() {
+ if (hasInterestIn != null && hasInterestIn.eIsProxy()) {
+ InternalEObject oldHasInterestIn = (InternalEObject)hasInterestIn;
+ hasInterestIn = (org.eclipse.papyrus.infra.viewpoints.iso42010.System)eResolveProxy(oldHasInterestIn);
+ if (hasInterestIn != oldHasInterestIn) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN, oldHasInterestIn, hasInterestIn));
+ }
+ }
+ return hasInterestIn;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public org.eclipse.papyrus.infra.viewpoints.iso42010.System basicGetHasInterestIn() {
+ return hasInterestIn;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetHasInterestIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System newHasInterestIn, NotificationChain msgs) {
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System oldHasInterestIn = hasInterestIn;
+ hasInterestIn = newHasInterestIn;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN, oldHasInterestIn, newHasInterestIn);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHasInterestIn(org.eclipse.papyrus.infra.viewpoints.iso42010.System newHasInterestIn) {
+ if (newHasInterestIn != hasInterestIn) {
+ NotificationChain msgs = null;
+ if (hasInterestIn != null)
+ msgs = ((InternalEObject)hasInterestIn).eInverseRemove(this, Iso42010Package.SYSTEM__STAKEHOLDERS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ if (newHasInterestIn != null)
+ msgs = ((InternalEObject)newHasInterestIn).eInverseAdd(this, Iso42010Package.SYSTEM__STAKEHOLDERS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ msgs = basicSetHasInterestIn(newHasInterestIn, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN, newHasInterestIn, newHasInterestIn));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getConcerns()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ if (hasInterestIn != null)
+ msgs = ((InternalEObject)hasInterestIn).eInverseRemove(this, Iso42010Package.SYSTEM__STAKEHOLDERS, org.eclipse.papyrus.infra.viewpoints.iso42010.System.class, msgs);
+ return basicSetHasInterestIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ return ((InternalEList<?>)getConcerns()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ return basicSetHasInterestIn(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ return getConcerns();
+ case Iso42010Package.STAKEHOLDER__VIEWPOINTS:
+ return getViewpoints();
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ if (resolve) return getHasInterestIn();
+ return basicGetHasInterestIn();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ getConcerns().clear();
+ getConcerns().addAll((Collection<? extends Concern>)newValue);
+ return;
+ case Iso42010Package.STAKEHOLDER__VIEWPOINTS:
+ getViewpoints().clear();
+ getViewpoints().addAll((Collection<? extends ArchitectureViewpoint>)newValue);
+ return;
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ setHasInterestIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ getConcerns().clear();
+ return;
+ case Iso42010Package.STAKEHOLDER__VIEWPOINTS:
+ getViewpoints().clear();
+ return;
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ setHasInterestIn((org.eclipse.papyrus.infra.viewpoints.iso42010.System)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.STAKEHOLDER__CONCERNS:
+ return concerns != null && !concerns.isEmpty();
+ case Iso42010Package.STAKEHOLDER__VIEWPOINTS:
+ return viewpoints != null && !viewpoints.isEmpty();
+ case Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN:
+ return hasInterestIn != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //StakeholderImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/SystemImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/SystemImpl.java
new file mode 100755
index 00000000000..2c9f04c02ce
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/impl/SystemImpl.java
@@ -0,0 +1,336 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>System</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl#getStakeholders <em>Stakeholders</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.iso42010.impl.SystemImpl#getExhibits <em>Exhibits</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SystemImpl extends MinimalEObjectImpl.Container implements org.eclipse.papyrus.infra.viewpoints.iso42010.System {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getStakeholders() <em>Stakeholders</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStakeholders()
+ * @generated
+ * @ordered
+ */
+ protected EList<Stakeholder> stakeholders;
+
+ /**
+ * The cached value of the '{@link #getExhibits() <em>Exhibits</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExhibits()
+ * @generated
+ * @ordered
+ */
+ protected Architecture exhibits;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SystemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return Iso42010Package.Literals.SYSTEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.SYSTEM__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Stakeholder> getStakeholders() {
+ if (stakeholders == null) {
+ stakeholders = new EObjectWithInverseResolvingEList<Stakeholder>(Stakeholder.class, this, Iso42010Package.SYSTEM__STAKEHOLDERS, Iso42010Package.STAKEHOLDER__HAS_INTEREST_IN);
+ }
+ return stakeholders;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Architecture getExhibits() {
+ if (exhibits != null && exhibits.eIsProxy()) {
+ InternalEObject oldExhibits = (InternalEObject)exhibits;
+ exhibits = (Architecture)eResolveProxy(oldExhibits);
+ if (exhibits != oldExhibits) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Iso42010Package.SYSTEM__EXHIBITS, oldExhibits, exhibits));
+ }
+ }
+ return exhibits;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Architecture basicGetExhibits() {
+ return exhibits;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExhibits(Architecture newExhibits, NotificationChain msgs) {
+ Architecture oldExhibits = exhibits;
+ exhibits = newExhibits;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Iso42010Package.SYSTEM__EXHIBITS, oldExhibits, newExhibits);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExhibits(Architecture newExhibits) {
+ if (newExhibits != exhibits) {
+ NotificationChain msgs = null;
+ if (exhibits != null)
+ msgs = ((InternalEObject)exhibits).eInverseRemove(this, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, Architecture.class, msgs);
+ if (newExhibits != null)
+ msgs = ((InternalEObject)newExhibits).eInverseAdd(this, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, Architecture.class, msgs);
+ msgs = basicSetExhibits(newExhibits, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Iso42010Package.SYSTEM__EXHIBITS, newExhibits, newExhibits));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getStakeholders()).basicAdd(otherEnd, msgs);
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ if (exhibits != null)
+ msgs = ((InternalEObject)exhibits).eInverseRemove(this, Iso42010Package.ARCHITECTURE__EXHIBITED_IN, Architecture.class, msgs);
+ return basicSetExhibits((Architecture)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ return ((InternalEList<?>)getStakeholders()).basicRemove(otherEnd, msgs);
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ return basicSetExhibits(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__NAME:
+ return getName();
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ return getStakeholders();
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ if (resolve) return getExhibits();
+ return basicGetExhibits();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__NAME:
+ setName((String)newValue);
+ return;
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ getStakeholders().clear();
+ getStakeholders().addAll((Collection<? extends Stakeholder>)newValue);
+ return;
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ setExhibits((Architecture)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ getStakeholders().clear();
+ return;
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ setExhibits((Architecture)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Iso42010Package.SYSTEM__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case Iso42010Package.SYSTEM__STAKEHOLDERS:
+ return stakeholders != null && !stakeholders.isEmpty();
+ case Iso42010Package.SYSTEM__EXHIBITS:
+ return exhibits != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SystemImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010AdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010AdapterFactory.java
new file mode 100755
index 00000000000..cbed837d81a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010AdapterFactory.java
@@ -0,0 +1,397 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package
+ * @generated
+ */
+public class Iso42010AdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static Iso42010Package modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010AdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = Iso42010Package.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Iso42010Switch<Adapter> modelSwitch =
+ new Iso42010Switch<Adapter>() {
+ @Override
+ public Adapter caseADElement(ADElement object) {
+ return createADElementAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureDescription(ArchitectureDescription object) {
+ return createArchitectureDescriptionAdapter();
+ }
+ @Override
+ public Adapter caseStakeholder(Stakeholder object) {
+ return createStakeholderAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureViewpoint(ArchitectureViewpoint object) {
+ return createArchitectureViewpointAdapter();
+ }
+ @Override
+ public Adapter caseModelKind(ModelKind object) {
+ return createModelKindAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureModel(ArchitectureModel object) {
+ return createArchitectureModelAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureView(ArchitectureView object) {
+ return createArchitectureViewAdapter();
+ }
+ @Override
+ public Adapter caseConcern(Concern object) {
+ return createConcernAdapter();
+ }
+ @Override
+ public Adapter caseSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System object) {
+ return createSystemAdapter();
+ }
+ @Override
+ public Adapter caseArchitecture(Architecture object) {
+ return createArchitectureAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureRationale(ArchitectureRationale object) {
+ return createArchitectureRationaleAdapter();
+ }
+ @Override
+ public Adapter caseCorrespondence(Correspondence object) {
+ return createCorrespondenceAdapter();
+ }
+ @Override
+ public Adapter caseCorrespondenceRule(CorrespondenceRule object) {
+ return createCorrespondenceRuleAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureDecision(ArchitectureDecision object) {
+ return createArchitectureDecisionAdapter();
+ }
+ @Override
+ public Adapter caseArchitectureFramework(ArchitectureFramework object) {
+ return createArchitectureFrameworkAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement <em>AD Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement
+ * @generated
+ */
+ public Adapter createADElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription <em>Architecture Description</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription
+ * @generated
+ */
+ public Adapter createArchitectureDescriptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder <em>Stakeholder</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder
+ * @generated
+ */
+ public Adapter createStakeholderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint <em>Architecture Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint
+ * @generated
+ */
+ public Adapter createArchitectureViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind <em>Model Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind
+ * @generated
+ */
+ public Adapter createModelKindAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel <em>Architecture Model</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel
+ * @generated
+ */
+ public Adapter createArchitectureModelAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView <em>Architecture View</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView
+ * @generated
+ */
+ public Adapter createArchitectureViewAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Concern <em>Concern</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Concern
+ * @generated
+ */
+ public Adapter createConcernAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.System <em>System</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.System
+ * @generated
+ */
+ public Adapter createSystemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture <em>Architecture</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture
+ * @generated
+ */
+ public Adapter createArchitectureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale <em>Architecture Rationale</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale
+ * @generated
+ */
+ public Adapter createArchitectureRationaleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence <em>Correspondence</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence
+ * @generated
+ */
+ public Adapter createCorrespondenceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule <em>Correspondence Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule
+ * @generated
+ */
+ public Adapter createCorrespondenceRuleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision <em>Architecture Decision</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision
+ * @generated
+ */
+ public Adapter createArchitectureDecisionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework <em>Architecture Framework</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework
+ * @generated
+ */
+ public Adapter createArchitectureFrameworkAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //Iso42010AdapterFactory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010Switch.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010Switch.java
new file mode 100755
index 00000000000..f3e6e493fbc
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010/src/org/eclipse/papyrus/infra/viewpoints/iso42010/util/Iso42010Switch.java
@@ -0,0 +1,437 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.iso42010.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ADElement;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Architecture;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDecision;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureDescription;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureModel;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureRationale;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureView;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Concern;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Correspondence;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.CorrespondenceRule;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package
+ * @generated
+ */
+public class Iso42010Switch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static Iso42010Package modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Iso42010Switch() {
+ if (modelPackage == null) {
+ modelPackage = Iso42010Package.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case Iso42010Package.AD_ELEMENT: {
+ ADElement adElement = (ADElement)theEObject;
+ T result = caseADElement(adElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_DESCRIPTION: {
+ ArchitectureDescription architectureDescription = (ArchitectureDescription)theEObject;
+ T result = caseArchitectureDescription(architectureDescription);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.STAKEHOLDER: {
+ Stakeholder stakeholder = (Stakeholder)theEObject;
+ T result = caseStakeholder(stakeholder);
+ if (result == null) result = caseADElement(stakeholder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_VIEWPOINT: {
+ ArchitectureViewpoint architectureViewpoint = (ArchitectureViewpoint)theEObject;
+ T result = caseArchitectureViewpoint(architectureViewpoint);
+ if (result == null) result = caseADElement(architectureViewpoint);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.MODEL_KIND: {
+ ModelKind modelKind = (ModelKind)theEObject;
+ T result = caseModelKind(modelKind);
+ if (result == null) result = caseADElement(modelKind);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_MODEL: {
+ ArchitectureModel architectureModel = (ArchitectureModel)theEObject;
+ T result = caseArchitectureModel(architectureModel);
+ if (result == null) result = caseADElement(architectureModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_VIEW: {
+ ArchitectureView architectureView = (ArchitectureView)theEObject;
+ T result = caseArchitectureView(architectureView);
+ if (result == null) result = caseADElement(architectureView);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.CONCERN: {
+ Concern concern = (Concern)theEObject;
+ T result = caseConcern(concern);
+ if (result == null) result = caseADElement(concern);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.SYSTEM: {
+ org.eclipse.papyrus.infra.viewpoints.iso42010.System system = (org.eclipse.papyrus.infra.viewpoints.iso42010.System)theEObject;
+ T result = caseSystem(system);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE: {
+ Architecture architecture = (Architecture)theEObject;
+ T result = caseArchitecture(architecture);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_RATIONALE: {
+ ArchitectureRationale architectureRationale = (ArchitectureRationale)theEObject;
+ T result = caseArchitectureRationale(architectureRationale);
+ if (result == null) result = caseADElement(architectureRationale);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.CORRESPONDENCE: {
+ Correspondence correspondence = (Correspondence)theEObject;
+ T result = caseCorrespondence(correspondence);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.CORRESPONDENCE_RULE: {
+ CorrespondenceRule correspondenceRule = (CorrespondenceRule)theEObject;
+ T result = caseCorrespondenceRule(correspondenceRule);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_DECISION: {
+ ArchitectureDecision architectureDecision = (ArchitectureDecision)theEObject;
+ T result = caseArchitectureDecision(architectureDecision);
+ if (result == null) result = caseADElement(architectureDecision);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Iso42010Package.ARCHITECTURE_FRAMEWORK: {
+ ArchitectureFramework architectureFramework = (ArchitectureFramework)theEObject;
+ T result = caseArchitectureFramework(architectureFramework);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>AD Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseADElement(ADElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Description</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Description</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureDescription(ArchitectureDescription object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Stakeholder</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Stakeholder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStakeholder(Stakeholder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureViewpoint(ArchitectureViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Kind</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Kind</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelKind(ModelKind object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Model</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Model</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureModel(ArchitectureModel object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture View</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture View</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureView(ArchitectureView object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Concern</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Concern</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConcern(Concern object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>System</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>System</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSystem(org.eclipse.papyrus.infra.viewpoints.iso42010.System object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitecture(Architecture object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Rationale</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Rationale</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureRationale(ArchitectureRationale object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Correspondence</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Correspondence</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCorrespondence(Correspondence object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Correspondence Rule</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Correspondence Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCorrespondenceRule(CorrespondenceRule object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Decision</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Decision</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureDecision(ArchitectureDecision object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Architecture Framework</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Architecture Framework</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseArchitectureFramework(ArchitectureFramework object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //Iso42010Switch
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.classpath
index ed2585fb3f4..ed2585fb3f4 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.classpath
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.classpath
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.project
index 772da1bd948..e895d4f56f5 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/.project
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.project
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.robotml.diagram.architecture</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.policy</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.core.resources.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.core.resources.prefs
new file mode 100755
index 00000000000..4101bc16c40
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//model/style.ecore=UTF-8
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..034e5ccd808
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.policy;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.policy.Activator
+Export-Package: org.eclipse.papyrus.infra.viewpoints.policy,
+ org.eclipse.papyrus.infra.viewpoints.style,
+ org.eclipse.papyrus.infra.viewpoints.style.impl,
+ org.eclipse.papyrus.infra.viewpoints.style.util
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.expressions,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;visibility:=reexport,
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.gmf.runtime.diagram.ui.providers,
+ org.eclipse.gmf.runtime.notation.edit,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.pluginexplorer;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0";visibility:=reexport
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/about.html
new file mode 100755
index 00000000000..dd02e0be168
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/build.properties
index 594508013d5..1aa2624ab66 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/build.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/build.properties
@@ -1,12 +1,14 @@
-source.. = src/,\
- src-gen/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- palettes/,\
- model/,\
- bundle.properties,\
- about.html,\
- plugin.properties
-src.includes = about.html
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties,\
+ builtin/,\
+ messages.properties,\
+ icons/,\
+ schema/,\
+ model/
+src.includes = about.html
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration
new file mode 100755
index 00000000000..743494f8b80
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration:PapyrusConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" defaultStakeholder="#//@stakeholders.0" metamodel="http://www.eclipse.org/uml2/5.0.0/UML#/">
+ <stakeholders name="Default Modeler" viewpoints="#//@viewpoints.0"/>
+ <viewpoints xsi:type="configuration:PapyrusViewpoint" name="Default Papyrus Viewpoint">
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="UML Inner Class Diagram" icon="platform:/plugin/org.eclipse.papyrus.uml.diagram.clazz/icons/obj16/Diagram_Class.gif" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Class">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </childRules>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Comment" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Class">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
+ </childRules>
+ <paletteRules element="clazz.tool.class"/>
+ <paletteRules element="clazz.tool.comment"/>
+ <paletteRules element="clazz.tool.interface"/>
+ <paletteRules element="clazz.tool.abstraction"/>
+ <paletteRules element="clazz.tool.association"/>
+ <paletteRules element="clazz.tool.generalization"/>
+ <paletteRules element="clazz.tool.generalizationset"/>
+ <paletteRules permit="false" element="clazz.tool.*"/>
+ <paletteRules element=""/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" name="UML Package Diagram" icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/Diagram_Package.gif" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ <paletteRules element="clazz.tool.comment"/>
+ <paletteRules element="clazz.tool.constraint"/>
+ <paletteRules element="clazz.tool.model"/>
+ <paletteRules element="clazz.tool.package"/>
+ <paletteRules element="clazz.tool.abstraction"/>
+ <paletteRules element="clazz.tool.dependency"/>
+ <paletteRules element="clazz.tool.packageimport"/>
+ <paletteRules element="clazz.tool.link"/>
+ <paletteRules permit="false" element="clazz.tool.*"/>
+ <paletteRules element=""/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLActivityDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLClassDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLCommunicationDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLComponentDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLComponentDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Component"/>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Component">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </childRules>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Comment" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Component">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
+ </childRules>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Constraint" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Component">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedRule"/>
+ </childRules>
+ <childRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Port" origin="http://www.eclipse.org/uml2/5.0.0/UML#//Component">
+ <insertionPath feature="http://www.eclipse.org/uml2/5.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </childRules>
+ <paletteRules permit="false" element="component.tool.model"/>
+ <paletteRules permit="false" element="component.tool.package"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="CompositeStructure" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="CompositeStructure" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="CompositeStructure" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Collaboration"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Collaboration"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLDeploymentDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLProfileDiagram" categories="#//@categories.2">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Profile"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Profile"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLSequenceDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Interaction"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLStateMachineDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//StateMachine"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//StateMachine"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLTimingDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="UseCase" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" implementationID="PapyrusUMLInteractionOverviewDiagram" categories="#//@categories.0">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Activity"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows" implementationID="BlockDefinition" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks" implementationID="InternalBlock" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows" implementationID="Parametric" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints" implementationID="Parametric" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints/ConstraintBlock"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints/ConstraintBlock"/>
+ <childRules/>
+ <paletteRules permit="false" element="parametric.tool.blockpropertycomposite"/>
+ <paletteRules permit="false" element="parametric.tool.reference"/>
+ <paletteRules permit="false" element="parametric.tool.value"/>
+ <paletteRules element=""/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows" implementationID="Parametric" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks/Block"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusDiagram" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows" implementationID="RequirementDiagram" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <childRules/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusSyncTable" name="View Table" icon="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/icons/nattablepageeditor.png" implementationID="PapyrusViewsTable">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusSyncTable" name="Generic Table" icon="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/icons/uml_generic_table.png" implementationID="PapyrusGenericTable">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusSyncTable" name="Allocation Table" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations" implementationID="PapyrusSysMLAllocationTable" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelKinds>
+ <modelKinds xsi:type="configuration:PapyrusSyncTable" name="Requirement Table" icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/icons/table_SysML_Requirement.png" profiles="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements" implementationID="PapyrusSysMLRequirementTable" categories="#//@categories.1">
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ <modelRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Class" stereotypes="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements/Requirement"/>
+ <owningRules element="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelKinds>
+ </viewpoints>
+ <categories name="uml"/>
+ <categories name="sysml"/>
+ <categories name="profile"/>
+</configuration:PapyrusConfiguration>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/icons/obj16/Diagram_Package.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Diagram_Package.gif
index be6068ee3d5..be6068ee3d5 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/icons/obj16/Diagram_Package.gif
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Diagram_Package.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif
new file mode 100755
index 00000000000..bafa3e1c2c9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif
new file mode 100755
index 00000000000..cccea64c44c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewTable.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Table.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Table.gif
new file mode 100755
index 00000000000..4aab89356c4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Table.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableDiagram.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableDiagram.gif
new file mode 100755
index 00000000000..e33d676eaaf
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableDiagram.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableTable.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableTable.gif
new file mode 100755
index 00000000000..6572944aa9a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableTable.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableView.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableView.gif
new file mode 100755
index 00000000000..67ddb9fef98
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/UnavailableView.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/View.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/View.gif
new file mode 100755
index 00000000000..763a4d1836c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/View.gif
Binary files differ
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/messages.properties
index 9fe9194a1cd..ddc4bafe96f 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/plugin.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/messages.properties
@@ -1,10 +1,13 @@
-#################################################################################
-# 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
-#
-##################################################################################
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = RobotML profile and libraries (Incubation)
+#################################################################################
+# Copyright (c) 2008 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:
+# Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+##################################################################################
+
+MsgPolicyDenyAdd=The current active viewpoint policy prevents the addition of this element to the view
+MsgPolicyDenyOwn=The current active viewpoint policy prevents this type of element to own this view \ No newline at end of file
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.ecore b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.ecore
new file mode 100755
index 00000000000..8c1d4d3616d
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.ecore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="style" nsURI="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style"
+ nsPrefix="style">
+ <eClassifiers xsi:type="ecore:EClass" name="PapyrusViewStyle" eSuperTypes="../../org.eclipse.gmf.runtime.notation/model/notation.ecore#//Style">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="ecore:EClass ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="configuration" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore#//PapyrusView"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.genmodel b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.genmodel
new file mode 100755
index 00000000000..b15e3a18421
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/model/style.genmodel
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.viewpoints.policy/src-gen" modelPluginID="org.eclipse.papyrus.infra.viewpoints.policy"
+ modelName="Style" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
+ language="" usedGenPackages="../../org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel#//configuration platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel#//iso42010 ../../org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>style.ecore</foreignModel>
+ <genPackages prefix="Style" basePackage="org.eclipse.papyrus.infra.viewpoints" disposableProviderFactory="true"
+ ecorePackage="style.ecore#/">
+ <genClasses ecoreClass="style.ecore#//PapyrusViewStyle">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference style.ecore#//PapyrusViewStyle/owner"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference style.ecore#//PapyrusViewStyle/prototype"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.properties
index 1b97f4f3266..5b5a8db1482 100644..100755
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.properties
@@ -1,12 +1,16 @@
-#################################################################################
-# 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:
-# Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - initial API and implementation
-##################################################################################
-pluginName=UML Package Diagram (Incubation)
-providerName=Eclipse Modeling Project
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Policies (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.xml
new file mode 100755
index 00000000000..22372a66bb9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/plugin.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.papyrus.infra.viewpoints.policy.custom" name="Custom Viewpoints Policy" schema="schema/custom.exsd"/>
+ <extension-point id="org.eclipse.papyrus.infra.viewpoints.policy.profilehelper" name="Viewpoints Policy Profile Helper" schema="schema/profilehelper.exsd"/>
+ <extension-point id="org.eclipse.papyrus.infra.viewpoints.policy.viewType" name="View Type Definition" schema="schema/viewType.exsd"/>
+ <extension
+ point="org.eclipse.emf.ecore.generated_package">
+ <package
+ class="org.eclipse.papyrus.infra.viewpoints.style.StylePackage"
+ genModel="model/style.genmodel"
+ uri="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style">
+ </package>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.infra.viewpoints.policy.PreferenceInitializer">
+ </initializer>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.papyrus.infra.viewpoints.policy.commands"
+ name="Dynamic Creation Commands">
+ </category>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.ui.main.toolbar">
+ <toolbar
+ id="org.eclipse.papyrus.infra.viewpoints.policy.toolbar"
+ label="Viewpoints Toolbar">
+ </toolbar>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.papyrus.views.category"
+ class="org.eclipse.papyrus.infra.viewpoints.policy.ViewpointExplorer"
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png"
+ id="org.eclipse.papyrus.infra.viewpoints.policy.ViewpointExplorer"
+ name="Viewpoint Explorer">
+ </view>
+ </extension>
+
+
+</plugin>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/custom.exsd b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/custom.exsd
new file mode 100755
index 00000000000..e626d8e4a34
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/custom.exsd
@@ -0,0 +1,113 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.viewpoints.policy" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.viewpoints.policy" id="org.eclipse.papyrus.infra.viewpoints.policy.custom" name="Custom Viewpoints Policy"/>
+ </appinfo>
+ <documentation>
+ Definition of Papyrus viewpoints configuration.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="configuration" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="contribution" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="configuration">
+ <annotation>
+ <documentation>
+ Represents the definition of a custom viewpoints configuration
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="file" type="string" use="required">
+ <annotation>
+ <documentation>
+ URI of a .configuration file containing the Papyrus viewpoints configuration to be applied
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="priority" type="string" use="required">
+ <annotation>
+ <documentation>
+ Priority of the policy between 0 (least) and 100 (most)
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="contribution">
+ <annotation>
+ <documentation>
+ Represents the contribution to an existing configuration
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="original" type="string" use="required">
+ <annotation>
+ <documentation>
+ The original configuration that is contributed to
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="file" type="string" use="required">
+ <annotation>
+ <documentation>
+ The configuration that is contributing
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+
+
+
+
+
+</schema>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/profilehelper.exsd b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/profilehelper.exsd
new file mode 100755
index 00000000000..6e0eee1380c
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/profilehelper.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.viewpoints.policy" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.viewpoints.policy" id="org.eclipse.papyrus.infra.viewpoints.policy.profilehelper" name="Viewpoints Policy Profile Helper"/>
+ </appinfo>
+ <documentation>
+ Definition of helpers for the handling of UML profiles by the Policy enforcement
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="helper"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="helper">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation class of the Profile Helper
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/viewType.exsd b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/viewType.exsd
new file mode 100755
index 00000000000..ac27b1583da
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/schema/viewType.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.infra.viewpoints.policy" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.infra.viewpoints.policy" id="org.eclipse.papyrus.infra.viewpoints.policy.viewType" name="View Type Definition"/>
+ </appinfo>
+ <documentation>
+ Definition of a type of view
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="helper"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="helper">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.infra.viewpoints.policy.IViewTypeHelper"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/PapyrusViewStyle.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/PapyrusViewStyle.java
new file mode 100755
index 00000000000..34478ed661e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/PapyrusViewStyle.java
@@ -0,0 +1,91 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gmf.runtime.notation.Style;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Papyrus View Style</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getConfiguration <em>Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage#getPapyrusViewStyle()
+ * @model
+ * @generated
+ */
+public interface PapyrusViewStyle extends Style {
+ /**
+ * Returns the value of the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Owner</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Owner</em>' reference.
+ * @see #setOwner(EObject)
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage#getPapyrusViewStyle_Owner()
+ * @model required="true"
+ * @generated
+ */
+ EObject getOwner();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getOwner <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Owner</em>' reference.
+ * @see #getOwner()
+ * @generated
+ */
+ void setOwner(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Configuration</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Configuration</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Configuration</em>' reference.
+ * @see #setConfiguration(PapyrusView)
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage#getPapyrusViewStyle_Configuration()
+ * @model required="true"
+ * @generated
+ */
+ PapyrusView getConfiguration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getConfiguration <em>Configuration</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Configuration</em>' reference.
+ * @see #getConfiguration()
+ * @generated
+ */
+ void setConfiguration(PapyrusView value);
+
+} // PapyrusViewStyle
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StyleFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StyleFactory.java
new file mode 100755
index 00000000000..acfb0771aac
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StyleFactory.java
@@ -0,0 +1,53 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage
+ * @generated
+ */
+public interface StyleFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StyleFactory eINSTANCE = org.eclipse.papyrus.infra.viewpoints.style.impl.StyleFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Papyrus View Style</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Papyrus View Style</em>'.
+ * @generated
+ */
+ PapyrusViewStyle createPapyrusViewStyle();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ StylePackage getStylePackage();
+
+} //StyleFactory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StylePackage.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StylePackage.java
new file mode 100755
index 00000000000..e3882c37de1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/StylePackage.java
@@ -0,0 +1,200 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StyleFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface StylePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "style";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/viewpoints/policy/style";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "style";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ StylePackage eINSTANCE = org.eclipse.papyrus.infra.viewpoints.style.impl.StylePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl <em>Papyrus View Style</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.style.impl.StylePackageImpl#getPapyrusViewStyle()
+ * @generated
+ */
+ int PAPYRUS_VIEW_STYLE = 0;
+
+ /**
+ * The feature id for the '<em><b>Owner</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_STYLE__OWNER = NotationPackage.STYLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Configuration</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_STYLE__CONFIGURATION = NotationPackage.STYLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Papyrus View Style</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_STYLE_FEATURE_COUNT = NotationPackage.STYLE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Papyrus View Style</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_VIEW_STYLE_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle <em>Papyrus View Style</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Papyrus View Style</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle
+ * @generated
+ */
+ EClass getPapyrusViewStyle();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getOwner <em>Owner</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Owner</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getOwner()
+ * @see #getPapyrusViewStyle()
+ * @generated
+ */
+ EReference getPapyrusViewStyle_Owner();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getConfiguration <em>Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle#getConfiguration()
+ * @see #getPapyrusViewStyle()
+ * @generated
+ */
+ EReference getPapyrusViewStyle_Configuration();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ StyleFactory getStyleFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl <em>Papyrus View Style</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.style.impl.StylePackageImpl#getPapyrusViewStyle()
+ * @generated
+ */
+ EClass PAPYRUS_VIEW_STYLE = eINSTANCE.getPapyrusViewStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Owner</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW_STYLE__OWNER = eINSTANCE.getPapyrusViewStyle_Owner();
+
+ /**
+ * The meta object literal for the '<em><b>Configuration</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_VIEW_STYLE__CONFIGURATION = eINSTANCE.getPapyrusViewStyle_Configuration();
+
+ }
+
+} //StylePackage
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/PapyrusViewStyleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/PapyrusViewStyleImpl.java
new file mode 100755
index 00000000000..528d31bacc6
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/PapyrusViewStyleImpl.java
@@ -0,0 +1,229 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
+import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Papyrus View Style</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl#getOwner <em>Owner</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.style.impl.PapyrusViewStyleImpl#getConfiguration <em>Configuration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PapyrusViewStyleImpl extends MinimalEObjectImpl.Container implements PapyrusViewStyle {
+ /**
+ * The cached value of the '{@link #getOwner() <em>Owner</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOwner()
+ * @generated
+ * @ordered
+ */
+ protected EObject owner;
+
+ /**
+ * The cached value of the '{@link #getConfiguration() <em>Configuration</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConfiguration()
+ * @generated
+ * @ordered
+ */
+ protected PapyrusView configuration;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PapyrusViewStyleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return StylePackage.Literals.PAPYRUS_VIEW_STYLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getOwner() {
+ if (owner != null && owner.eIsProxy()) {
+ InternalEObject oldOwner = (InternalEObject)owner;
+ owner = eResolveProxy(oldOwner);
+ if (owner != oldOwner) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StylePackage.PAPYRUS_VIEW_STYLE__OWNER, oldOwner, owner));
+ }
+ }
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetOwner() {
+ return owner;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOwner(EObject newOwner) {
+ EObject oldOwner = owner;
+ owner = newOwner;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StylePackage.PAPYRUS_VIEW_STYLE__OWNER, oldOwner, owner));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusView getConfiguration() {
+ if (configuration != null && configuration.eIsProxy()) {
+ InternalEObject oldConfiguration = (InternalEObject)configuration;
+ configuration = (PapyrusView)eResolveProxy(oldConfiguration);
+ if (configuration != oldConfiguration) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION, oldConfiguration, configuration));
+ }
+ }
+ return configuration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusView basicGetConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setConfiguration(PapyrusView newConfiguration) {
+ PapyrusView oldConfiguration = configuration;
+ configuration = newConfiguration;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION, oldConfiguration, configuration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_VIEW_STYLE__OWNER:
+ if (resolve) return getOwner();
+ return basicGetOwner();
+ case StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION:
+ if (resolve) return getConfiguration();
+ return basicGetConfiguration();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_VIEW_STYLE__OWNER:
+ setOwner((EObject)newValue);
+ return;
+ case StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION:
+ setConfiguration((PapyrusView)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_VIEW_STYLE__OWNER:
+ setOwner((EObject)null);
+ return;
+ case StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION:
+ setConfiguration((PapyrusView)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case StylePackage.PAPYRUS_VIEW_STYLE__OWNER:
+ return owner != null;
+ case StylePackage.PAPYRUS_VIEW_STYLE__CONFIGURATION:
+ return configuration != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //PapyrusViewStyleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StyleFactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StyleFactoryImpl.java
new file mode 100755
index 00000000000..9d5b17843f8
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StyleFactoryImpl.java
@@ -0,0 +1,106 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.viewpoints.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StyleFactoryImpl extends EFactoryImpl implements StyleFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static StyleFactory init() {
+ try {
+ StyleFactory theStyleFactory = (StyleFactory)EPackage.Registry.INSTANCE.getEFactory(StylePackage.eNS_URI);
+ if (theStyleFactory != null) {
+ return theStyleFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new StyleFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case StylePackage.PAPYRUS_VIEW_STYLE: return createPapyrusViewStyle();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PapyrusViewStyle createPapyrusViewStyle() {
+ PapyrusViewStyleImpl papyrusViewStyle = new PapyrusViewStyleImpl();
+ return papyrusViewStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StylePackage getStylePackage() {
+ return (StylePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static StylePackage getPackage() {
+ return StylePackage.eINSTANCE;
+ }
+
+} //StyleFactoryImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StylePackageImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StylePackageImpl.java
new file mode 100755
index 00000000000..4b166c9a502
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/impl/StylePackageImpl.java
@@ -0,0 +1,210 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle;
+import org.eclipse.papyrus.infra.viewpoints.style.StyleFactory;
+import org.eclipse.papyrus.infra.viewpoints.style.StylePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StylePackageImpl extends EPackageImpl implements StylePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass papyrusViewStyleEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private StylePackageImpl() {
+ super(eNS_URI, StyleFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link StylePackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static StylePackage init() {
+ if (isInited) return (StylePackage)EPackage.Registry.INSTANCE.getEPackage(StylePackage.eNS_URI);
+
+ // Obtain or create and register package
+ StylePackageImpl theStylePackage = (StylePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StylePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StylePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ConfigurationPackage.eINSTANCE.eClass();
+ NotationPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theStylePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theStylePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theStylePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(StylePackage.eNS_URI, theStylePackage);
+ return theStylePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPapyrusViewStyle() {
+ return papyrusViewStyleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusViewStyle_Owner() {
+ return (EReference)papyrusViewStyleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusViewStyle_Configuration() {
+ return (EReference)papyrusViewStyleEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleFactory getStyleFactory() {
+ return (StyleFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ papyrusViewStyleEClass = createEClass(PAPYRUS_VIEW_STYLE);
+ createEReference(papyrusViewStyleEClass, PAPYRUS_VIEW_STYLE__OWNER);
+ createEReference(papyrusViewStyleEClass, PAPYRUS_VIEW_STYLE__CONFIGURATION);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ NotationPackage theNotationPackage = (NotationPackage)EPackage.Registry.INSTANCE.getEPackage(NotationPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ ConfigurationPackage theConfigurationPackage = (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ papyrusViewStyleEClass.getESuperTypes().add(theNotationPackage.getStyle());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(papyrusViewStyleEClass, PapyrusViewStyle.class, "PapyrusViewStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPapyrusViewStyle_Owner(), theEcorePackage.getEObject(), null, "owner", null, 1, 1, PapyrusViewStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusViewStyle_Configuration(), theConfigurationPackage.getPapyrusView(), null, "configuration", null, 1, 1, PapyrusViewStyle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //StylePackageImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleAdapterFactory.java
new file mode 100755
index 00000000000..e5612e40605
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleAdapterFactory.java
@@ -0,0 +1,151 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.gmf.runtime.notation.Style;
+
+import org.eclipse.papyrus.infra.viewpoints.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage
+ * @generated
+ */
+public class StyleAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StylePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = StylePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StyleSwitch<Adapter> modelSwitch =
+ new StyleSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusViewStyle(PapyrusViewStyle object) {
+ return createPapyrusViewStyleAdapter();
+ }
+ @Override
+ public Adapter caseStyle(Style object) {
+ return createStyleAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle <em>Papyrus View Style</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.viewpoints.style.PapyrusViewStyle
+ * @generated
+ */
+ public Adapter createPapyrusViewStyleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.gmf.runtime.notation.Style <em>Style</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.gmf.runtime.notation.Style
+ * @generated
+ */
+ public Adapter createStyleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //StyleAdapterFactory
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleSwitch.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleSwitch.java
new file mode 100755
index 00000000000..8dc58ae4491
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src-gen/org/eclipse/papyrus/infra/viewpoints/style/util/StyleSwitch.java
@@ -0,0 +1,139 @@
+/**
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.style.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.gmf.runtime.notation.Style;
+
+import org.eclipse.papyrus.infra.viewpoints.style.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.style.StylePackage
+ * @generated
+ */
+public class StyleSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static StylePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StyleSwitch() {
+ if (modelPackage == null) {
+ modelPackage = StylePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case StylePackage.PAPYRUS_VIEW_STYLE: {
+ PapyrusViewStyle papyrusViewStyle = (PapyrusViewStyle)theEObject;
+ T result = casePapyrusViewStyle(papyrusViewStyle);
+ if (result == null) result = caseStyle(papyrusViewStyle);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Papyrus View Style</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Papyrus View Style</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePapyrusViewStyle(PapyrusViewStyle object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Style</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Style</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStyle(Style object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //StyleSwitch
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/Activator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/Activator.java
new file mode 100755
index 00000000000..f695b17a236
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/Activator.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.viewpoints.policy"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ // The log for this plugin
+ private LogHelper log;
+
+ /**
+ * Gets the Papyrus log associated with this plugin
+ *
+ * @return The Papyrus log for this plugin
+ */
+ public LogHelper getPapyrusLog() {
+ return log;
+ }
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ this.log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicCommandHandler.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicCommandHandler.java
new file mode 100755
index 00000000000..c50c7553249
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicCommandHandler.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.IHandlerListener;
+
+
+/**
+ * Represents the default handler for commands about the creation of dynamic views.
+ * This class is used to activate the UI elements that rely on the corresponding commands.
+ *
+ * @author Laurent Wouters
+ */
+public class DynamicCommandHandler implements IHandler {
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#addHandlerListener(org.eclipse.core.commands.IHandlerListener)
+ */
+ public void addHandlerListener(IHandlerListener handlerListener) {
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#dispose()
+ */
+ public void dispose() {
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#isEnabled()
+ */
+ public boolean isEnabled() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#isHandled()
+ */
+ public boolean isHandled() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.core.commands.IHandler#removeHandlerListener(org.eclipse.core.commands.IHandlerListener)
+ */
+ public void removeHandlerListener(IHandlerListener handlerListener) {
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicContribution.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicContribution.java
new file mode 100755
index 00000000000..088fcadb681
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/DynamicContribution.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.CompoundContributionItem;
+
+/**
+ * Represent the dynamic contribution of a policy to some UI elements
+ *
+ * @author Laurent Wouters
+ */
+public abstract class DynamicContribution extends CompoundContributionItem {
+
+ /**
+ * Creation message prefix
+ */
+ protected static final String CREATE_MESSAGE = "Create a new ";
+
+ /**
+ * Constructor.
+ */
+ protected DynamicContribution() {
+ }
+
+ /**
+ * Constructor.
+ */
+ protected DynamicContribution(String id) {
+ }
+
+ /**
+ * @see org.eclipse.ui.actions.CompoundContributionItem#isDynamic()
+ */
+ @Override
+ public boolean isDynamic() {
+ return true;
+ }
+
+ /**
+ * Gets the current selection as an EObject
+ *
+ * @return The current selection, or <code>null</code> if it is not an EObject
+ */
+ protected EObject getSelection() {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window == null)
+ return null;
+ ISelection selection = window.getSelectionService().getSelection();
+ if (selection == null)
+ return null;
+ if (selection.isEmpty())
+ return null;
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection struct = (IStructuredSelection) selection;
+ Object obj = struct.getFirstElement();
+ return EMFHelper.getEObject(obj);
+ }
+ return null;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IProfileHelper.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IProfileHelper.java
new file mode 100755
index 00000000000..cf96c652625
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IProfileHelper.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * Represents a helper for the Policy Checker that is able to check the application of UML profiles
+ *
+ * @author Laurent Wouters
+ */
+public interface IProfileHelper {
+
+ /**
+ * Gets a collection of the profiles (as EPackage-s) applied on the given model
+ *
+ * @param model
+ * The model to inspect
+ * @return A collection of profiles (as EPackage)
+ */
+ Collection<EPackage> getAppliedProfiles(EObject model);
+
+ /**
+ * Gets a collection of the stereotypes (as EClass-es) applied to the given object
+ *
+ * @param object
+ * The object to inspect
+ * @return A collection of stereotypes (as EClass)
+ */
+ Collection<EClass> getAppliedStereotypes(EObject object);
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IViewTypeHelper.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IViewTypeHelper.java
new file mode 100755
index 00000000000..1efe4f7bdf4
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/IViewTypeHelper.java
@@ -0,0 +1,60 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+
+
+/**
+ * Represents a helper for the handling of view creation commands
+ *
+ * @author Laurent Wouters
+ */
+public interface IViewTypeHelper {
+ /**
+ * Determines whether the given type of view is supported by this helper
+ *
+ * @return <code>true</code> if the type of view is supported by this helper
+ */
+ boolean isSupported(EClass type);
+
+ /**
+ * Determines whether the given object represents a view that is supported by this helper
+ *
+ * @param view
+ * The object to enquire
+ * @return <code>true</code> if the object represents a view supported by this helper
+ */
+ boolean isSupported(EObject view);
+
+ /**
+ * Gets the prototype for the given configuration element
+ *
+ * @param configuration
+ * A view configuration element
+ * @return The associated prototype
+ */
+ ViewPrototype getPrototypeFor(PapyrusView configuration);
+
+ /**
+ * Gets the prototype of the given view
+ *
+ * @param view
+ * The view
+ * @return The prototype of the given view
+ */
+ ViewPrototype getPrototypeOf(EObject view);
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ModelAddData.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ModelAddData.java
new file mode 100755
index 00000000000..96255381264
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ModelAddData.java
@@ -0,0 +1,195 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+
+/**
+ * Represents the set of data related to the insertion of a new model element in a view
+ *
+ * @author Laurent Wouters
+ */
+public class ModelAddData {
+ private boolean permit;
+ private List<EReference> path;
+ private EObject undoOrigin;
+ private EReference undoReference;
+ private EObject undoValuePrevious;
+ private EObject undoValueNext;
+
+ /**
+ * Determines whether the insertion is permitted
+ *
+ * @return <code>true</code> if it is permitted
+ */
+ public boolean isPermitted() {
+ return permit;
+ }
+
+ /**
+ * Determines whether an insertion path for the new element has been defined
+ *
+ * @return <code>true</code> if an insertion path has been defined
+ */
+ public boolean isPathDefined() {
+ return (path != null);
+ }
+
+ /**
+ * Initializes this set of data without an insertion path
+ *
+ * @param permit
+ * Is the insertion permitted?
+ */
+ public ModelAddData(boolean permit) {
+ this.permit = permit;
+ }
+
+ /**
+ * Initializes this set of data
+ *
+ * @param permit
+ * Is the insertion permitted?
+ * @param insertionPath
+ * The insertion path
+ */
+ public ModelAddData(boolean permit, EList<PathElement> insertionPath) {
+ this.permit = permit;
+ if (insertionPath != null && !insertionPath.isEmpty()) {
+ this.path = new ArrayList<EReference>(insertionPath.size());
+ for (int i = 0; i != insertionPath.size(); i++)
+ path.add(insertionPath.get(i).getFeature());
+ }
+ }
+
+ /**
+ * Execute the insertion represented by this object on the given origin object
+ *
+ * @param origin
+ * The origin object
+ * @param target
+ * The object to insert
+ * @return <code>true</code> if the insertion was successful
+ */
+ public boolean execute(EObject origin, EObject target) {
+ EObject current = origin;
+ int index = 0;
+ while (index < path.size() - 1) {
+ current = buildPathStep(current, path.get(index));
+ if (current == null)
+ return false;
+ index++;
+ }
+ EReference feature = path.get(path.size() - 1);
+ if (feature.isMany()) {
+ EList list = (EList) current.eGet(feature);
+ list.add(target);
+ setUndo(current, feature, null, target);
+ } else {
+ setUndo(current, feature, (EObject) current.eGet(feature), target);
+ current.eSet(feature, target);
+ }
+ return true;
+ }
+
+ /**
+ * Undo the effect of a previous execute
+ */
+ public void undoExecute() {
+ if (undoReference.isMany()) {
+ ((EList) undoOrigin.eGet(undoReference)).remove(undoValueNext);
+ } else {
+ undoOrigin.eSet(undoReference, undoValuePrevious);
+ }
+ }
+
+ /**
+ * Re-execute the insertion represented by this object
+ */
+ public void redoExecute() {
+ if (undoReference.isMany()) {
+ ((EList) undoOrigin.eGet(undoReference)).add(undoValueNext);
+ } else {
+ undoOrigin.eSet(undoReference, undoValueNext);
+ }
+ }
+
+ /**
+ * Executes a step in the insertion path
+ *
+ * @param current
+ * The current object
+ * @param feature
+ * The feature to resolve on the object
+ * @return The resolved object at this step that is now contained in current.feature
+ */
+ private EObject buildPathStep(EObject current, EReference feature) {
+ Object value = current.eGet(feature);
+ if (value == null) {
+ // Try to create an instance of the type
+ EClass type = feature.getEReferenceType();
+ if (type.isAbstract())
+ return null; // Too bad, we can't fix this
+ EObject inst = EcoreUtil.create(type);
+ current.eSet(feature, inst);
+ setUndo(current, feature, null, inst);
+ return inst;
+ } else if (value instanceof EList) {
+ EList list = (EList) value;
+ // If we got at least one element, return the first one
+ if (!list.isEmpty()) {
+ return (EObject) list.get(0);
+ }
+ // We have to create one
+ EClass type = feature.getEReferenceType();
+ if (type.isAbstract())
+ return null; // Too bad, we can't fix this
+ EObject inst = EcoreUtil.create(type);
+ list.add(inst);
+ setUndo(current, feature, null, inst);
+ return inst;
+ } else {
+ return (EObject) value;
+ }
+ }
+
+ /**
+ * Sets up the undo data if necessary
+ *
+ * @param origin
+ * The modified object
+ * @param feature
+ * The modified feature
+ * @param previous
+ * The previous value
+ * @param next
+ * The target value
+ */
+ private void setUndo(EObject origin, EReference feature, EObject previous, EObject next) {
+ if (undoReference == null)
+ return;
+ undoOrigin = origin;
+ undoReference = feature;
+ undoValuePrevious = previous;
+ undoValueNext = next;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/NotationUtils.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/NotationUtils.java
new file mode 100755
index 00000000000..06858ca5ebe
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/NotationUtils.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * Helper methods for the .notation related resources
+ *
+ * @author Laurent Wouters
+ */
+public class NotationUtils {
+
+ /**
+ * Gets the roots of the notations resources related to the given object
+ *
+ * @param element
+ * The object from which to retrieve the notation resources
+ * @return An iterator of notation resources' roots, or <code>null</code> if none cannot be resolved
+ */
+ public static Iterator<EObject> getNotationRoots(EObject element) {
+ Iterator<Resource> notations = getNotationResources(element);
+ if (notations == null)
+ return null;
+ return new RootsIterator(notations);
+ }
+
+ /**
+ * Represents an iterator on all the roots of the notations resources of a ResourceSet
+ *
+ * @author Laurent Wouters
+ */
+ private static class RootsIterator implements Iterator<EObject> {
+ private Iterator<Resource> notations;
+ private Iterator<EObject> inner;
+
+ public RootsIterator(Iterator<Resource> notations) {
+ this.notations = notations;
+ if (notations.hasNext())
+ inner = notations.next().getAllContents();
+ }
+
+ public boolean hasNext() {
+ if (inner == null)
+ return false;
+ if (inner.hasNext())
+ return true;
+ while (notations.hasNext()) {
+ inner = notations.next().getAllContents();
+ if (inner.hasNext())
+ return true;
+ }
+ inner = null;
+ return false;
+ }
+
+ public EObject next() {
+ if (inner == null)
+ return null;
+ if (inner.hasNext())
+ return inner.next();
+ while (notations.hasNext()) {
+ inner = notations.next().getAllContents();
+ if (inner.hasNext())
+ return inner.next();
+ }
+ inner = null;
+ return null;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+
+ /**
+ * Gets the notation resources related to the given object
+ *
+ * @param element
+ * The object from which to retrieve the notation resources
+ * @return An iterator of notation resources, or <code>null</code> if none cannot be resolved
+ */
+ public static Iterator<Resource> getNotationResources(EObject element) {
+ Iterator<Resource> result = tryGetNotationResources(element);
+ if (result != null)
+ return result;
+ IAdaptable input = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getInput();
+ if (input != null) {
+ EObject obj = (EObject) input.getAdapter(EObject.class);
+ return tryGetNotationResources(obj);
+ }
+ return null;
+ }
+
+ /**
+ * Tries to get the notation resources related to the given object
+ *
+ * @param element
+ * The object from which to retrieve the notation resources
+ * @return An iterator of notation resources, or <code>null</code> if none cannot be resolved
+ */
+ private static Iterator<Resource> tryGetNotationResources(EObject element) {
+ if (element == null)
+ return null;
+ if (element.eResource() == null)
+ return null;
+ return new NotationsIterator(element.eResource().getResourceSet());
+ }
+
+
+ /**
+ * Represents an iterator over the notation resources of a ResourceSet
+ *
+ * @author Laurent Wouters
+ */
+ private static class NotationsIterator implements Iterator<Resource> {
+ private Iterator<Resource> inner;
+ private Resource next;
+
+ public NotationsIterator(ResourceSet set) {
+ inner = set.getResources().iterator();
+ next = getNextNotation();
+ }
+
+ private Resource getNextNotation() {
+ while (inner.hasNext()) {
+ Resource resource = inner.next();
+ String uri = resource.getURI().toString();
+ if (uri.endsWith(".notation"))
+ return resource;
+ }
+ return null;
+ }
+
+ public boolean hasNext() {
+ return (next != null);
+ }
+
+ public Resource next() {
+ Resource result = next;
+ next = getNextNotation();
+ return result;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
new file mode 100755
index 00000000000..81156d18a14
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
@@ -0,0 +1,978 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+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.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.core.pluginexplorer.Plugin;
+import org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+
+/**
+ * The <code>PolicyChecker</code> enforces the viewpoints configuration as a policy in the user interface
+ *
+ * @author Laurent Wouters
+ */
+public class PolicyChecker {
+ /**
+ * ID of the extension point defining the configurations
+ */
+ private static final String EXTENSION_ID = "org.eclipse.papyrus.infra.viewpoints.policy.custom";
+ /**
+ * The cache of loaded configurations
+ */
+ private static final Map<String, PapyrusConfiguration> CONFIGURATIONS_CACHE = new HashMap<String, PapyrusConfiguration>();
+ /**
+ * The default built-in configuration
+ */
+ private static final PapyrusConfiguration CONFIG_BUILTIN_DEFAULT = loadDefaultConfiguration("builtin/default.configuration");
+ /**
+ * Default result when the current policy cannot determine whether an element can be added to a view
+ */
+ private static final boolean DEFAULT_POLICY_UNKNOWN_CHILD = false;
+ /**
+ * Default result when the current policy cannot determine whether a palette item should be exposed
+ */
+ private static final boolean DEFAULT_POLICY_UNKNWON_PALETTE = true;
+
+
+ /**
+ * Policy check result allowing an action
+ */
+ private static final int RESULT_PERMIT = 1;
+ /**
+ * Policy check result neither allowing not denying an action
+ */
+ private static final int RESULT_UNKNOWN = 0;
+ /**
+ * Policy check result denying an action
+ */
+ private static final int RESULT_DENY = -1;
+
+ /**
+ * Loads a built-in configuration
+ *
+ * @param name
+ * The name of the configuration
+ * @return The loaded configuration
+ */
+ private static PapyrusConfiguration loadDefaultConfiguration(String name) {
+ Plugin me = new Plugin(Activator.getDefault().getBundle());
+ PluginEntry entry = me.getEntry(name);
+ return loadConfigurationFrom(entry.getLogicalPath());
+ }
+
+ /**
+ * Loads a viewpoints configuration from the given location.
+ *
+ * @param location
+ * The location from where to load the configuration
+ * @return The loaded configuration, or <code>null</code> if the operation failed
+ */
+ public static PapyrusConfiguration loadConfigurationFrom(String location) {
+ try {
+ if (location == null)
+ return null;
+ if (location.isEmpty())
+ return null;
+ URI uri = null;
+ if (location.startsWith("platform:/")) {
+ uri = URI.createURI(location);
+ } else {
+ uri = URI.createFileURI(location);
+ }
+ location = uri.toString();
+ PapyrusConfiguration config = CONFIGURATIONS_CACHE.get(location);
+ if (config != null)
+ return config;
+ ResourceSet set = new ResourceSetImpl();
+ Resource res = set.getResource(uri, true);
+ config = (PapyrusConfiguration) res.getContents().get(0);
+ CONFIGURATIONS_CACHE.put(location, config);
+ return config;
+ } catch (NullPointerException e) {
+ }
+ return null;
+ }
+
+ /**
+ * Gets the default configuration
+ *
+ * @return The default configuration
+ */
+ public static PapyrusConfiguration getDefaultConfiguration() {
+ return CONFIG_BUILTIN_DEFAULT;
+ }
+
+
+ private static Map<String, Collection<String>> CONTRIBUTIONS_DEFINITON = null;
+ private static Map<PapyrusConfiguration, Collection<PapyrusConfiguration>> CONTRIBUTIONS_CACHE = null;
+
+ /**
+ * Gets the viewpoints contributing to the given viewpoint
+ *
+ * @param viewpoint
+ * A viewpoint
+ * @return A collection of the other viewpoints contributing to the given one
+ */
+ private static Collection<PapyrusViewpoint> getContributionsTo(PapyrusViewpoint viewpoint) {
+ Collection<PapyrusViewpoint> result = new ArrayList<PapyrusViewpoint>();
+ Collection<PapyrusConfiguration> contributions = getContributionsTo((PapyrusConfiguration) viewpoint.eContainer());
+ for (PapyrusConfiguration contrib : contributions) {
+ for (ArchitectureViewpoint vp : contrib.getViewpoints()) {
+ if (vp instanceof PapyrusViewpoint && vp.getName().equals(viewpoint.getName())) {
+ result.add((PapyrusViewpoint) vp);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the configurations contributing to the given configuration
+ *
+ * @param config
+ * A configuration
+ * @return A collection of the contributing configurations
+ */
+ private static Collection<PapyrusConfiguration> getContributionsTo(PapyrusConfiguration config) {
+ if (CONTRIBUTIONS_CACHE == null)
+ loadContributions();
+ Collection<PapyrusConfiguration> result = CONTRIBUTIONS_CACHE.get(config);
+ if (result != null)
+ return result;
+ result = new ArrayList<PapyrusConfiguration>();
+ CONTRIBUTIONS_CACHE.put(config, result);
+ for (Map.Entry<String, PapyrusConfiguration> entry : CONFIGURATIONS_CACHE.entrySet()) {
+ if (entry.getValue() == config) {
+ Collection<String> contribURIs = CONTRIBUTIONS_DEFINITON.get(entry.getKey());
+ if (contribURIs != null)
+ for (String uri : contribURIs)
+ result.add(loadConfigurationFrom(uri));
+ return result;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Loads the viewpoints contribution data from the extension points
+ */
+ private static void loadContributions() {
+ CONTRIBUTIONS_DEFINITON = new HashMap<String, Collection<String>>();
+ CONTRIBUTIONS_CACHE = new HashMap<PapyrusConfiguration, Collection<PapyrusConfiguration>>();
+
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
+ IExtension[] extensions = point.getExtensions();
+
+ for (int i = 0; i != extensions.length; i++) {
+ String plugin = extensions[i].getContributor().getName();
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j = 0; j != elements.length; j++) {
+ if (elements[j].getName().equals("contribution")) {
+ String uriOriginal = getCanonicalURI(plugin, elements[j].getAttribute("original"));
+ String uriContrib = getCanonicalURI(plugin, elements[j].getAttribute("file"));
+ Collection<String> list = CONTRIBUTIONS_DEFINITON.get(uriOriginal);
+ if (list == null) {
+ list = new ArrayList<String>();
+ CONTRIBUTIONS_DEFINITON.put(uriOriginal, list);
+ }
+ list.add(uriContrib);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the canonical (absolute) URI from a potentially plugin-relative URI
+ *
+ * @param plugin
+ * The container plugin
+ * @param uri
+ * The URI to canonicalize
+ * @return The canonical (absolute) URI
+ */
+ private static String getCanonicalURI(String plugin, String uri) {
+ if (uri.startsWith(PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE))
+ return uri;
+ return PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE + plugin + "/" + uri;
+ }
+
+
+ /**
+ * Gets the preference store for the viewpoints-related preferences
+ *
+ * @return The preference store for the viewpoints-related preferences
+ */
+ public static IPreferenceStore getPreferences() {
+ return Activator.getDefault().getPreferenceStore();
+ }
+
+
+ /**
+ * The current (global) instance
+ */
+ private static PolicyChecker currentPolicyChecker;
+
+ /**
+ * Gets the policy checker currently enforcing the viewpoints configuration
+ *
+ * @return The current policy checker
+ */
+ public static PolicyChecker getCurrent() {
+ if (currentPolicyChecker == null)
+ currentPolicyChecker = new PolicyChecker();
+ return currentPolicyChecker;
+ }
+
+ /**
+ * Sets the policy checker currently enforcing the viewpoints configuration
+ *
+ * @param pc
+ * The new policy checker
+ */
+ public static void setCurrent(PolicyChecker pc) {
+ currentPolicyChecker = pc;
+ }
+
+
+ /**
+ * The checker's configuration
+ */
+ private PapyrusConfiguration configuration;
+
+ /**
+ * Force only one type of view per model element
+ */
+ private boolean oneViewPerElem;
+
+ /**
+ * The current stakeholder
+ */
+ private Stakeholder selectedStakeholder;
+
+ /**
+ * The current viewpoint
+ */
+ private PapyrusViewpoint selectedViewpoint;
+
+ /**
+ * The cache of applicable viewpoints, with all contributing configurations taken into account
+ */
+ private Collection<PapyrusViewpoint> applicableViewpoints;
+
+ /**
+ * The current profile helper
+ */
+ private IProfileHelper profileHelper;
+
+ /**
+ * Gets the configuration enforced by this object
+ *
+ * @return The configuration
+ */
+ public PapyrusConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Gets the stakeholder represented by this object
+ *
+ * @return The stakeholder
+ */
+ public Stakeholder getStakeholder() {
+ return selectedStakeholder;
+ }
+
+ /**
+ * Gets the viewpoint enforced by this object
+ *
+ * @return The enforced viewpoint
+ */
+ public PapyrusViewpoint getViewpoint() {
+ return selectedViewpoint;
+ }
+
+ /**
+ * Initializes this instance from the current preferences
+ */
+ private PolicyChecker() {
+ IPreferenceStore store = getPreferences();
+ String prefType = store.getString(PreferenceConstants.P_CONF_TYPE);
+ String prefForce = store.getString(PreferenceConstants.P_FORCE_MULTIPLICITY);
+ String prefViewpoint = store.getString(PreferenceConstants.P_VIEWPOINT);
+
+ this.profileHelper = ProfileUtils.getProfileHelper();
+ this.oneViewPerElem = "true".equals(prefForce);
+ if (PreferenceConstants.P_CONF_TYPE_DEFAULT_VALUE.equals(prefType)) {
+ this.configuration = CONFIG_BUILTIN_DEFAULT;
+ } else if (PreferenceConstants.P_CONF_TYPE_EXTENSION_VALUE.equals(prefType)) {
+ WeightedConfiguration wc = WeightedConfiguration.getTopConfiguration();
+ this.configuration = (wc != null ? wc.getConfiguration() : null);
+ } else {
+ String scheme = store.getString(PreferenceConstants.P_CONF_PATH_SCHEME);
+ String path = store.getString(PreferenceConstants.P_CONF_PATH);
+ if (PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE.equals(scheme))
+ path = PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE + path;
+ this.configuration = loadConfigurationFrom(path);
+ }
+ if (this.configuration == null)
+ this.configuration = CONFIG_BUILTIN_DEFAULT;
+
+ if (prefViewpoint != null && !prefViewpoint.isEmpty()) {
+ for (Stakeholder stakeholder : this.configuration.getStakeholders()) {
+ for (ArchitectureViewpoint vp : stakeholder.getViewpoints()) {
+ if (prefViewpoint.equals(vp.getName())) {
+ this.selectedStakeholder = stakeholder;
+ this.selectedViewpoint = (PapyrusViewpoint) vp;
+ buildApplicableViewpoints();
+ return;
+ }
+ }
+ }
+ }
+ this.selectedStakeholder = this.configuration.getDefaultStakeholder();
+ this.selectedViewpoint = (PapyrusViewpoint) this.selectedStakeholder.getViewpoints().get(0);
+ buildApplicableViewpoints();
+ }
+
+ /**
+ * Initializes this policy checker with the default configuration and viewpoint
+ *
+ * @param oneViewPerElem
+ * Force only one type of view per model element
+ */
+ public PolicyChecker(boolean oneViewPerElem) {
+ this.configuration = CONFIG_BUILTIN_DEFAULT;
+ this.oneViewPerElem = oneViewPerElem;
+ this.selectedStakeholder = this.configuration.getDefaultStakeholder();
+ this.selectedViewpoint = (PapyrusViewpoint) this.selectedStakeholder.getViewpoints().get(0);
+ this.profileHelper = ProfileUtils.getProfileHelper();
+ buildApplicableViewpoints();
+ }
+
+ /**
+ * Initializes this policy checker with the given configuration and viewpoint
+ *
+ * @param config
+ * The configuration to enforce
+ * @param viewpoint
+ * The viewpoint to enforce
+ * @param oneViewPerElem
+ * Force only one type of view per model element
+ */
+ public PolicyChecker(PapyrusConfiguration config, PapyrusViewpoint viewpoint, boolean oneViewPerElem) {
+ this.configuration = config;
+ this.oneViewPerElem = oneViewPerElem;
+ this.selectedViewpoint = viewpoint;
+ this.profileHelper = ProfileUtils.getProfileHelper();
+ buildApplicableViewpoints();
+ for (Stakeholder stakeholder : configuration.getStakeholders()) {
+ if (stakeholder.getViewpoints().contains(viewpoint)) {
+ this.selectedStakeholder = stakeholder;
+ return;
+ }
+ }
+ }
+
+
+ /**
+ * Builds the <code>applicableViewpoints</code> member from the selected viewpoint and all its contribution
+ */
+ private void buildApplicableViewpoints() {
+ applicableViewpoints = new ArrayList<PapyrusViewpoint>();
+ buildApplicableViewpoints(selectedViewpoint);
+ for (PapyrusViewpoint vp : getContributionsTo(selectedViewpoint))
+ buildApplicableViewpoints(vp);
+ }
+
+ /**
+ * Builds the <code>applicableViewpoints</code> member from the given viewpoint by adding it, as well as its parent
+ *
+ * @param from
+ * The top viewpoint
+ */
+ private void buildApplicableViewpoints(PapyrusViewpoint from) {
+ PapyrusViewpoint vp = from;
+ while (vp != null) {
+ applicableViewpoints.add(vp);
+ vp = vp.getParent();
+ }
+ }
+
+
+ /**
+ * Determines whether the given element can own the given view
+ *
+ * @param element
+ * The possible owner
+ * @param prototype
+ * The view prototype
+ * @return <code>true</code> if the element can own the view
+ */
+ public boolean canOwnNewView(EObject element, ViewPrototype prototype) {
+ if (prototype == null)
+ return false;
+ if (!matchesProfiles(prototype.configuration, profileHelper.getAppliedProfiles(element)))
+ return false;
+ return (matchesOwnerMultiplicity(prototype.configuration, element.eClass(), profileHelper.getAppliedStereotypes(element), getOwnedViewCount(element, prototype)));
+ }
+
+ /**
+ * Determines whether the given element can be the root of a view owned by the given object
+ *
+ * @param element
+ * The possible root element
+ * @param owner
+ * The possible owner
+ * @param prototype
+ * The view prototype
+ * @return <code>true</code> if the element can be the root
+ */
+ public boolean canHaveNewView(EObject element, EObject owner, ViewPrototype prototype) {
+ if (prototype == null)
+ return false;
+ if (!matchesProfiles(prototype.configuration, profileHelper.getAppliedProfiles(owner)))
+ return false;
+ if (!matchesProfiles(prototype.configuration, profileHelper.getAppliedProfiles(element)))
+ return false;
+ if (!matchesOwnerMultiplicity(prototype.configuration, owner.eClass(), profileHelper.getAppliedStereotypes(owner), getOwnedViewCount(owner, prototype)))
+ return false;
+ if (!matchesRootMultiplicity(prototype.configuration, element.eClass(), profileHelper.getAppliedStereotypes(element), getViewCountOn(element, prototype)))
+ return false;
+ return true;
+ }
+
+ /**
+ * Gets the insertion data of the given element in the given diagram
+ *
+ * @param diagram
+ * The diagram
+ * @param parent
+ * The element to be edited
+ * @param child
+ * The element to be added through the diagram
+ * @return The insertion data
+ */
+ public ModelAddData getChildAddData(Diagram diagram, EObject parent, EObject child) {
+ ViewPrototype prototype = ViewPrototype.get(diagram);
+ if (prototype == null)
+ // This diagram is not in the current policy
+ return new ModelAddData(false);
+
+ PapyrusDiagram config = (PapyrusDiagram) prototype.configuration;
+ Collection<EClass> stereotypes = profileHelper.getAppliedStereotypes(child);
+ while (config != null) {
+ for (ChildRule rule : config.getChildRules()) {
+ int result = allows(rule, parent.eClass(), child.eClass(), stereotypes);
+ if (result != RESULT_UNKNOWN)
+ return new ModelAddData((result == RESULT_PERMIT), rule.getInsertionPath());
+ }
+ config = (PapyrusDiagram) config.getParent();
+ }
+ return new ModelAddData(DEFAULT_POLICY_UNKNOWN_CHILD);
+ }
+
+ /**
+ * Gets the insertion data of the given element in the given diagram
+ *
+ * @param diagram
+ * The diagram
+ * @param parentType
+ * The type of the element to be edited
+ * @param childType
+ * The type of element to be added through the diagram
+ * @return The insertion data
+ */
+ public ModelAddData getChildAddData(Diagram diagram, EClass parentType, EClass childType) {
+ ViewPrototype prototype = ViewPrototype.get(diagram);
+ if (prototype == null)
+ // This diagram is not in the current policy
+ return new ModelAddData(false);
+
+ PapyrusDiagram config = (PapyrusDiagram) prototype.configuration;
+ while (config != null) {
+ for (ChildRule rule : config.getChildRules()) {
+ int result = allows(rule, parentType, childType, new ArrayList<EClass>(0));
+ if (result != RESULT_UNKNOWN)
+ return new ModelAddData((result == RESULT_PERMIT), rule.getInsertionPath());
+ }
+ config = (PapyrusDiagram) config.getParent();
+ }
+ return new ModelAddData(DEFAULT_POLICY_UNKNOWN_CHILD);
+ }
+
+ /**
+ * Determines whether the given diagram can have the palette element with the given entry ID
+ *
+ * @param diagram
+ * The diagram
+ * @param entryID
+ * A palette element entry ID
+ * @return <code>true</code> if the palette element is allowed
+ */
+ public boolean isInPalette(Diagram diagram, String entryID) {
+ ViewPrototype prototype = ViewPrototype.get(diagram);
+ if (prototype == null)
+ // This diagram is not in the current policy
+ return false;
+
+ PapyrusDiagram config = (PapyrusDiagram) prototype.configuration;
+ while (config != null) {
+ for (PaletteRule rule : config.getPaletteRules()) {
+ int result = allows(rule, entryID);
+ if (result != RESULT_UNKNOWN)
+ return (result == RESULT_PERMIT);
+ }
+ config = (PapyrusDiagram) config.getParent();
+ }
+ return DEFAULT_POLICY_UNKNWON_PALETTE;
+ }
+
+ /**
+ * Determines whether the given view configuration element is part of the current viewpoint
+ *
+ * @param config
+ * A view configuration element
+ * @return <code>true</code> if the element is part of the current viewpoint
+ */
+ public boolean isInViewpoint(PapyrusView config) {
+ for (PapyrusViewpoint viewpoint : applicableViewpoints) {
+ for (ModelKind kind : viewpoint.getModelKinds()) {
+ PapyrusView view = (PapyrusView) kind;
+ if (EcoreUtil.equals(view, config))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Gets a collection of all the view prototypes allowed by the active policy
+ *
+ * @return A collection of view prototypes
+ */
+ public Collection<ViewPrototype> getAllPrototypes() {
+ Collection<ViewPrototype> result = new ArrayList<ViewPrototype>();
+ for (PapyrusViewpoint viewpoint : applicableViewpoints) {
+ for (ModelKind kind : viewpoint.getModelKinds()) {
+ PapyrusView view = (PapyrusView) kind;
+ ViewPrototype proto = ViewPrototype.get(view);
+ if (proto != null)
+ result.add(proto);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets a list of the prototypes that can be instantiated with the given element as owner according to the policy
+ *
+ * @param element
+ * The element to test
+ * @return A list of the prototypes that can be instantiated
+ */
+ public Collection<ViewPrototype> getPrototypesFor(EObject element) {
+ Collection<ViewPrototype> result = new ArrayList<ViewPrototype>();
+ Collection<EPackage> profiles = profileHelper.getAppliedProfiles(element);
+ Collection<EClass> stereotypes = profileHelper.getAppliedStereotypes(element);
+ for (PapyrusViewpoint viewpoint : applicableViewpoints) {
+ for (ModelKind kind : viewpoint.getModelKinds()) {
+ PapyrusView view = (PapyrusView) kind;
+ if (!matchesProfiles(view, profiles))
+ continue;
+ ViewPrototype proto = ViewPrototype.get(view);
+ if (proto == null)
+ continue;
+ int count = getOwnedViewCount(element, proto);
+ if (!matchesOwnerMultiplicity(view, element.eClass(), stereotypes, count))
+ continue;
+ result.add(proto);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the number of views of a given type owned by a given object
+ *
+ * @param element
+ * The object to count views for
+ * @param prototype
+ * The prototype of view to counts
+ * @return The number of owned views
+ */
+ private int getOwnedViewCount(EObject element, ViewPrototype prototype) {
+ int count = 0;
+ Iterator<EObject> roots = NotationUtils.getNotationRoots(element);
+ if (roots == null)
+ return count;
+ while (roots.hasNext()) {
+ EObject view = roots.next();
+ ViewPrototype proto = ViewPrototype.get(view);
+ if (prototype == proto) {
+ EObject owner = proto.getOwnerOf(view);
+ if (EcoreUtil.equals(owner, element))
+ count++;
+ }
+ }
+ return count;
+ }
+
+ /**
+ * Gets the number of views of a given type on a given object
+ *
+ * @param element
+ * The object to count views on
+ * @param prototype
+ * The prototype of view to counts
+ * @return The number of views on the object
+ */
+ private int getViewCountOn(EObject element, ViewPrototype prototype) {
+ int count = 0;
+ Iterator<EObject> roots = NotationUtils.getNotationRoots(element);
+ if (roots == null)
+ return count;
+ while (roots.hasNext()) {
+ EObject view = roots.next();
+ ViewPrototype proto = ViewPrototype.get(view);
+ if (prototype == proto) {
+ EObject root = proto.getRootOf(view);
+ if (EcoreUtil.equals(root, element))
+ count++;
+ }
+ }
+ return count;
+ }
+
+ /**
+ * Tries to match a view configuration from the given info
+ *
+ * @param implem
+ * The implementation ID
+ * @param owner
+ * The owner
+ * @param root
+ * The root element
+ * @return The matching view, or <code>null</code> if none was found
+ */
+ protected PapyrusView getViewFrom(String implem, EObject owner, EObject root) {
+ for (PapyrusViewpoint viewpoint : applicableViewpoints) {
+ for (ModelKind kind : viewpoint.getModelKinds()) {
+ PapyrusView view = (PapyrusView) kind;
+ if (matches(view, implem, owner, root))
+ return view;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Tries to match a view configuration with the given info
+ *
+ * @param view
+ * A view configuration
+ * @param implem
+ * The implementation ID
+ * @param owner
+ * The owner
+ * @param root
+ * The root element
+ * @return <code>true</code> if the configuration matches
+ */
+ private boolean matches(PapyrusView view, String implem, EObject owner, EObject root) {
+ if (!ViewPrototype.isNatural(view))
+ return false;
+ if (!view.getImplementationID().equals(implem))
+ return false;
+ if (owner != null) {
+ if (!matchesProfiles(view, profileHelper.getAppliedProfiles(owner)))
+ return false;
+ if (!matchesOwner(view, owner.eClass(), profileHelper.getAppliedStereotypes(owner)))
+ return false;
+ }
+ if (root != null) {
+ if (!matchesProfiles(view, profileHelper.getAppliedProfiles(root)))
+ return false;
+ if (!matchesRoot(view, root.eClass(), profileHelper.getAppliedStereotypes(root)))
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Checks whether the given set of profiles matches the requirements of the given view
+ *
+ * @param view
+ * The view to check against
+ * @param profiles
+ * The applied profiles
+ * @return <code>true</code> if the prototype is matching
+ */
+ private boolean matchesProfiles(PapyrusView view, Collection<EPackage> profiles) {
+ PapyrusView current = view;
+ while (current != null) {
+ for (EPackage profile : view.getProfiles())
+ if (!profiles.contains(profile))
+ return false;
+ current = current.getParent();
+ }
+ return true;
+ }
+
+ /**
+ * Checks whether the given type of owning element with applied stereotypes is allowed for the given view
+ *
+ * @param view
+ * The view to check against
+ * @param type
+ * The owning element's type
+ * @param stereotypes
+ * The stereotypes applied on the owning element
+ * @return <code>true</code> if the prototype is matching
+ */
+ private boolean matchesOwner(PapyrusView view, EClass type, Collection<EClass> stereotypes) {
+ PapyrusView current = view;
+ while (current != null) {
+ for (OwningRule rule : current.getOwningRules()) {
+ int result = allows(rule, type, stereotypes);
+ if (result == RESULT_DENY)
+ return false;
+ if (result == RESULT_PERMIT)
+ return true;
+ }
+ current = current.getParent();
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the given view can be owned by an element of the given type, applied with the given stereotypes if the cardinality is already the given amount
+ *
+ * @param view
+ * The view to check against
+ * @param type
+ * The owning element's type
+ * @param stereotypes
+ * The stereotypes applied on the owning element
+ * @param count
+ * The current cardinality for the owning element
+ * @return <code>true</code> if the prototype is matching
+ */
+ private boolean matchesOwnerMultiplicity(PapyrusView view, EClass type, Collection<EClass> stereotypes, int count) {
+ PapyrusView current = view;
+ while (current != null) {
+ for (OwningRule rule : current.getOwningRules()) {
+ int allow = allows(rule, type, stereotypes);
+ if (allow == RESULT_DENY)
+ return false;
+ if (allow == RESULT_UNKNOWN)
+ continue;
+ int multiplicity = rule.getMultiplicity();
+ if (multiplicity == -1)
+ return true;
+ return (count < multiplicity);
+ }
+ current = current.getParent();
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the given type of root element with applied stereotypes is allowed for the given view
+ *
+ * @param view
+ * The view to check against
+ * @param type
+ * The root element's type
+ * @param stereotypes
+ * The stereotypes applied on the root element
+ * @return <code>true</code> if the prototype is matching
+ */
+ private boolean matchesRoot(PapyrusView view, EClass type, Collection<EClass> stereotypes) {
+ PapyrusView current = view;
+ while (current != null) {
+ for (ModelRule rule : current.getModelRules()) {
+ int result = allows(rule, type, stereotypes);
+ if (result == RESULT_DENY)
+ return false;
+ if (result == RESULT_PERMIT)
+ return true;
+ }
+ current = current.getParent();
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the given view can have the given root element of the given type, applied with the given stereotypes if the cardinality is already the given amount
+ *
+ * @param view
+ * The view to check against
+ * @param type
+ * The root element's type
+ * @param stereotypes
+ * The stereotypes applied on the root element
+ * @param count
+ * The current cardinality for the root element
+ * @return <code>true</code> if the prototype is matching
+ */
+ private boolean matchesRootMultiplicity(PapyrusView view, EClass type, Collection<EClass> stereotypes, int count) {
+ PapyrusView current = view;
+ while (current != null) {
+ for (ModelRule rule : current.getModelRules()) {
+ int allow = allows(rule, type, stereotypes);
+ if (allow == RESULT_DENY)
+ return false;
+ if (allow == RESULT_UNKNOWN)
+ continue;
+ int multiplicity = (oneViewPerElem ? 1 : rule.getMultiplicity());
+ if (multiplicity == -1)
+ return true;
+ return (count < multiplicity);
+ }
+ current = current.getParent();
+ }
+ return false;
+ }
+
+ /**
+ * Checks an owner's type against a rule
+ *
+ * @param rule
+ * The owning rule
+ * @param owner
+ * The owner's type
+ * @param stereotypes
+ * The stereotypes applied on <code>owner</code>
+ * @return The check result
+ */
+ private int allows(OwningRule rule, EClass owner, Collection<EClass> stereotypes) {
+ EClass c = rule.getElement();
+ if (c == null || c.isSuperTypeOf(owner)) {
+ // matching type => check the application of the required stereotypes
+ for (EClass stereotype : rule.getStereotypes())
+ if (!stereotypes.contains(stereotype))
+ return RESULT_UNKNOWN;
+ return rule.isPermit() ? RESULT_PERMIT : RESULT_DENY;
+ } else {
+ // type is not matching => unknown
+ return RESULT_UNKNOWN;
+ }
+ }
+
+ /**
+ * Checks a root element's type against a rule
+ *
+ * @param rule
+ * The modeling rule
+ * @param element
+ * The root element's type
+ * @param stereotypes
+ * The stereotypes applied on <code>element</code>
+ * @return The check result
+ */
+ private int allows(ModelRule rule, EClass element, Collection<EClass> stereotypes) {
+ EClass c = rule.getElement();
+ if (c == null || c.isSuperTypeOf(element)) {
+ // matching type => check the application of the required stereotypes
+ for (EClass stereotype : rule.getStereotypes())
+ if (!stereotypes.contains(stereotype))
+ return RESULT_UNKNOWN;
+ return rule.isPermit() ? RESULT_PERMIT : RESULT_DENY;
+ } else {
+ // type is not matching => unknown
+ return RESULT_UNKNOWN;
+ }
+ }
+
+ /**
+ * Checks a child insertion against a rule
+ *
+ * @param rule
+ * The insertion rule
+ * @param origin
+ * The root element's type
+ * @param element
+ * The child's type
+ * @param stereotypes
+ * The stereotypes applied on <code>element</code>
+ * @return The check result
+ */
+ private int allows(ChildRule rule, EClass origin, EClass element, Collection<EClass> stereotypes) {
+ EClass ce = rule.getElement();
+ EClass co = rule.getOrigin();
+ if ((ce == null || ce.isSuperTypeOf(element))
+ && (co == null || co.isSuperTypeOf(origin))) {
+ // matching type => check the application of the required stereotypes
+ for (EClass stereotype : rule.getStereotypes())
+ if (!stereotypes.contains(stereotype))
+ return RESULT_UNKNOWN;
+ return rule.isPermit() ? RESULT_PERMIT : RESULT_DENY;
+ } else {
+ // type is not matching => unknown
+ return RESULT_UNKNOWN;
+ }
+ }
+
+ /**
+ * Checks a palette element against a rule
+ *
+ * @param rule
+ * The palette rule
+ * @param toolID
+ * The palette element's ID
+ * @return The check result
+ */
+ private int allows(PaletteRule rule, String toolID) {
+ String elem = rule.getElement();
+ boolean applies = (elem == null);
+ applies = applies || (elem.length() == 0);
+ applies = applies || (elem != null && elem.equals(toolID));
+ applies = applies || (elem != null && elem.endsWith("*") && toolID.startsWith(elem.substring(0, elem.length() - 1)));
+ if (applies)
+ return rule.isPermit() ? RESULT_PERMIT : RESULT_DENY;
+ return RESULT_UNKNOWN;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceConstants.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceConstants.java
new file mode 100755
index 00000000000..1e433ad793e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceConstants.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+/**
+ * Contains all the constants for the management of the viewpoints-related configuration preferences
+ *
+ * @author Laurent Wouters
+ */
+public class PreferenceConstants {
+
+ /**
+ * Preference for the type of configuration selection
+ */
+ public static final String P_CONF_TYPE = "papyrusViewpointsConfigurationType";
+
+ /**
+ * Preference for the scheme of the path to a custom configuration
+ */
+ public static final String P_CONF_PATH_SCHEME = "papyrusViewpointsUserDefinedScheme";
+
+ /**
+ * Preference for the path to a custom configuration
+ */
+ public static final String P_CONF_PATH = "papyrusViewpointsUserDefinedConfiguration";
+
+ /**
+ * Preference for the configuration's stakeholder
+ */
+ public static final String P_STAKEHOLDER = "papyrusViewpointsSelectedStakeholder";
+
+ /**
+ * Preference for the configuration's viewpoint
+ */
+ public static final String P_VIEWPOINT = "papyrusViewpointsSelectedViewpoint";
+
+ /**
+ * Preference for the forced multiplicity
+ */
+ public static final String P_FORCE_MULTIPLICITY = "papyrusViewpointsForceMultiplicity";
+
+
+ public static final String P_CONF_TYPE_DEFAULT_LABEL = "Default (Papyrus built-in configuration, allows all)";
+ public static final String P_CONF_TYPE_DEFAULT_VALUE = "default";
+
+ public static final String P_CONF_TYPE_EXTENSION_LABEL = "Deployed through the extension point";
+ public static final String P_CONF_TYPE_EXTENSION_VALUE = "extension";
+
+ public static final String P_CONF_TYPE_USER_DEFINED_LABEL = "Manual configuration selection";
+ public static final String P_CONF_TYPE_USER_DEFINED_VALUE = "custom";
+
+ public static final String P_CONF_PATH_SCHEME_FILE_LABEL = "Absolute path";
+ public static final String P_CONF_PATH_SCHEME_FILE_VALUE = "file";
+
+ public static final String P_CONF_PATH_SCHEME_WORKSPACE_LABEL = "Workspace file";
+ public static final String P_CONF_PATH_SCHEME_WORKSPACE_VALUE = "platform:/resource/";
+
+ public static final String P_CONF_PATH_SCHEME_PLUGIN_LABEL = "Embedded in a plugin";
+ public static final String P_CONF_PATH_SCHEME_PLUGIN_VALUE = "platform:/plugin/";
+
+ public static final String P_FORCE_MULTIPLICITY_LABEL = "Force at most one view of each type per model element";
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceInitializer.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceInitializer.java
new file mode 100755
index 00000000000..7d9613edc3f
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PreferenceInitializer.java
@@ -0,0 +1,41 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * Initializes the default preferences for the viewpoints
+ *
+ * @author Laurent Wouters
+ */
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ store.setDefault(PreferenceConstants.P_CONF_TYPE, PreferenceConstants.P_CONF_TYPE_EXTENSION_VALUE);
+ store.setDefault(PreferenceConstants.P_CONF_PATH_SCHEME, PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE);
+ store.setDefault(PreferenceConstants.P_CONF_PATH, "");
+ store.setDefault(PreferenceConstants.P_STAKEHOLDER, "");
+ store.setDefault(PreferenceConstants.P_VIEWPOINT, "");
+ store.setDefault(PreferenceConstants.P_FORCE_MULTIPLICITY, "false");
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ProfileUtils.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ProfileUtils.java
new file mode 100755
index 00000000000..de66e9d2aaf
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ProfileUtils.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+
+/**
+ * Helper class for the ProfileHelper extension point
+ *
+ * @author Laurent Wouters
+ */
+class ProfileUtils {
+ /**
+ * ID of the extension point
+ */
+ private static final String EXTENSION_ID = "org.eclipse.papyrus.infra.viewpoints.policy.profilehelper";
+
+ /**
+ * Gets a instance of the <code>IProfileHelper</code> interface
+ *
+ * @return an instance of <code>IProfileHelper</code>
+ */
+ public static IProfileHelper getProfileHelper() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
+ IExtension[] extensions = point.getExtensions();
+
+ for (int i = 0; i != extensions.length; i++) {
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j = 0; j != elements.length; j++) {
+ try {
+ IProfileHelper instance = (IProfileHelper) elements[j].createExecutableExtension("class");
+ if (instance != null)
+ return instance;
+ } catch (CoreException e) {
+ }
+ }
+ }
+ return new DefaultProfileHelper();
+ }
+
+ /**
+ * Represents a default implementation of the profile helper
+ *
+ * @author Laurent Wouters
+ */
+ private static class DefaultProfileHelper implements IProfileHelper {
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper#getAppliedProfiles(org.eclipse.emf.ecore.EObject)
+ */
+ public Collection<EPackage> getAppliedProfiles(EObject model) {
+ return new ArrayList<EPackage>(0);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper#getAppliedStereotypes(org.eclipse.emf.ecore.EObject)
+ */
+ public Collection<EClass> getAppliedStereotypes(EObject object) {
+ return new ArrayList<EClass>(0);
+ }
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/UnavailableViewPrototype.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/UnavailableViewPrototype.java
new file mode 100755
index 00000000000..80a2ac3fce5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/UnavailableViewPrototype.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * Represents a view prototype that is not available in the current viewpoints configuration
+ *
+ * @author Laurent Wouters
+ */
+public class UnavailableViewPrototype extends ViewPrototype {
+
+ private String name;
+
+ private String icon;
+
+ /**
+ * Constructor.
+ */
+ protected UnavailableViewPrototype(String name, String icon) {
+ super(null);
+ this.name = name;
+ this.icon = icon;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#isNatural()
+ */
+ @Override
+ public boolean isNatural() {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getImplementation()
+ */
+ @Override
+ public String getImplementation() {
+ return "PapyrusUnavailableView";
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getLabel()
+ */
+ @Override
+ public String getLabel() {
+ return "Unavailable " + name;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getQualifiedName()
+ */
+ @Override
+ public String getQualifiedName() {
+ return "Default Papyrus Viewpoint :: " + getLabel();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getIconURI()
+ */
+ @Override
+ public String getIconURI() {
+ return "platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/Unavailable" + icon + ".gif";
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#isOwnerReassignable()
+ */
+ @Override
+ public boolean isOwnerReassignable() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public boolean instantiateOn(EObject owner) {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#instantiateOn(org.eclipse.emf.ecore.EObject, java.lang.String)
+ */
+ @Override
+ public boolean instantiateOn(EObject owner, String name) {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getCommandChangeOwner(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public Command getCommandChangeOwner(EObject view, EObject target) {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getCommandChangeRoot(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public Command getCommandChangeRoot(EObject view, EObject target) {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getOwnerOf(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public EObject getOwnerOf(EObject view) {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype#getRootOf(org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public EObject getRootOf(EObject view) {
+ return null;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototype.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototype.java
new file mode 100755
index 00000000000..1d35e6fad90
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototype.java
@@ -0,0 +1,440 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
+import org.eclipse.swt.graphics.Image;
+
+
+/**
+ * Represents a prototype of view in Papyrus
+ *
+ * @author Laurent Wouters
+ */
+public abstract class ViewPrototype {
+ /**
+ * Singleton for unavailable views
+ */
+ public static final ViewPrototype UNAVAILABLE_VIEW = new UnavailableViewPrototype("View", "View");
+ /**
+ * Singleton for unavailable views (diagrams)
+ */
+ public static final ViewPrototype UNAVAILABLE_DIAGRAM = new UnavailableViewPrototype("Diagram", "Diagram");
+
+ /**
+ * Singleton for unavailable views (tables)
+ */
+ public static final ViewPrototype UNAVAILABLE_TABLE = new UnavailableViewPrototype("Table", "Table");
+
+ /**
+ * ID of the extension point for Papyrus diagrams
+ */
+ protected static final String EXTENSION_ID = "org.eclipse.papyrus.infra.viewpoints.policy.viewType";
+
+ /**
+ * The collection of helpers
+ */
+ private static final Collection<IViewTypeHelper> HELPERS = getCommandHelpers();
+
+ /**
+ * Retrieves the helpers from the extensions
+ *
+ * @return The helpers
+ */
+ private static Collection<IViewTypeHelper> getCommandHelpers() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
+ IExtension[] extensions = point.getExtensions();
+
+ Collection<IViewTypeHelper> result = new ArrayList<IViewTypeHelper>();
+ for (int i = 0; i != extensions.length; i++) {
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j = 0; j != elements.length; j++) {
+ try {
+ IViewTypeHelper instance = (IViewTypeHelper) elements[j].createExecutableExtension("class");
+ if (instance != null)
+ result.add(instance);
+ } catch (CoreException e) {
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Determines whether the given configuration element applies on a natural view
+ *
+ * @param config
+ * The configuration element
+ * @return <code>true</code> if the configuration applies on a natural view
+ */
+ public static boolean isNatural(PapyrusView config) {
+ return config.getName() == null && config.getIcon() == null;
+ }
+
+ /**
+ * Determines whether the given object is a supported view object
+ *
+ * @param object
+ * The object to inspect
+ * @return <code>true</code> if the object is a supported view
+ */
+ public static boolean isViewObject(EObject object) {
+ for (IViewTypeHelper helper : HELPERS)
+ if (helper.isSupported(object))
+ return true;
+ return false;
+ }
+
+ /**
+ * Gets the prototype for the given configuration element
+ *
+ * @param config
+ * The configuration element
+ * @return The prototype
+ */
+ public static ViewPrototype get(PapyrusView config) {
+ for (IViewTypeHelper helper : HELPERS) {
+ if (helper.isSupported(config.eClass())) {
+ ViewPrototype proto = helper.getPrototypeFor(config);
+ if (proto != null)
+ return proto;
+ }
+ }
+ if (config instanceof PapyrusDiagram)
+ return UNAVAILABLE_DIAGRAM;
+ else if (config instanceof PapyrusTable)
+ return UNAVAILABLE_TABLE;
+ else if (config instanceof PapyrusSyncTable)
+ return UNAVAILABLE_TABLE;
+ else
+ return UNAVAILABLE_VIEW;
+ }
+
+ /**
+ * Gets the prototype for the the given object representing a view
+ *
+ * @param view
+ * The view for which a prototype is expected
+ * @return The view's prototype
+ */
+ public static ViewPrototype get(EObject view) {
+ for (IViewTypeHelper helper : HELPERS) {
+ if (helper.isSupported(view)) {
+ ViewPrototype proto = helper.getPrototypeOf(view);
+ if (proto != null)
+ return proto;
+ }
+ }
+ return UNAVAILABLE_VIEW;
+ }
+
+ /**
+ * Gets the prototype for the given implementation identifier
+ *
+ * @param implem
+ * The implementation ID
+ * @param owner
+ * The owner
+ * @param root
+ * The root element
+ * @return The prototype
+ */
+ public static ViewPrototype get(String implem, EObject owner, EObject root) {
+ PapyrusView view = PolicyChecker.getCurrent().getViewFrom(implem, owner, root);
+ if (view == null)
+ // The given implementation has been inhibited by the current viewpoint configuration
+ return UNAVAILABLE_VIEW;
+ return get(view);
+ }
+
+
+ /**
+ * The configuration element of this view
+ */
+ protected final PapyrusView configuration;
+
+ /**
+ * Constructor.
+ *
+ * @param configuration
+ * The configuration element
+ */
+ protected ViewPrototype(PapyrusView configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * Gets the configuration element for this view prototype
+ *
+ * @return The configuration element
+ */
+ public PapyrusView getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Gets whether the represented view is the raw implementation
+ *
+ * @return <code>true</code> if this is a natural view
+ */
+ public boolean isNatural() {
+ return isNatural(configuration);
+ }
+
+ /**
+ * Gets the ID of the implementation of this prototype
+ *
+ * @return The implementation ID
+ */
+ public String getImplementation() {
+ return configuration.getImplementationID();
+ }
+
+ /**
+ * Gets the label
+ *
+ * @return The label
+ */
+ public String getLabel() {
+ return configuration.getName();
+ }
+
+ /**
+ * Gets the full label that is qualified with its possible root elements
+ *
+ * @return The full label
+ */
+ public String getFullLabel() {
+ StringBuilder builder = new StringBuilder(getLabel());
+ builder.append(" for ");
+ boolean first = true;
+ for (ModelRule rule : configuration.getModelRules()) {
+ if (rule.getStereotypes() != null && rule.getStereotypes().size() > 0) {
+ for (EClass stereotype : rule.getStereotypes()) {
+ if (!first) {
+ builder.append(", ");
+ first = false;
+ }
+ builder.append(stereotype.getName());
+ }
+ } else if (rule.getElement() != null) {
+ if (!first) {
+ builder.append(", ");
+ first = false;
+ }
+ builder.append(rule.getElement().getName());
+ } else {
+ continue;
+ }
+ }
+ return builder.toString();
+ }
+
+ /**
+ * Gets the qualified name of this prototype
+ *
+ * @return The qualified name
+ */
+ public String getQualifiedName() {
+ PapyrusViewpoint vp = (PapyrusViewpoint) configuration.eContainer();
+ return vp.getName() + " :: " + getLabel();
+ }
+
+ /**
+ * Gets the URI of this prototype's icon
+ *
+ * @return The icon's URI
+ */
+ public String getIconURI() {
+ return configuration.getIcon();
+ }
+
+ /**
+ * Gets the image descriptor of this prototype's icon
+ *
+ * @return The icon's descriptor
+ */
+ public ImageDescriptor getIconDescriptor() {
+ URL url = null;
+ try {
+ url = new URL(getIconURI());
+ } catch (MalformedURLException e) {
+ Activator.getDefault().getPapyrusLog().error("Cannot load icon at URI " + getIconURI(), e);
+ }
+ return ImageDescriptor.createFromURL(url);
+ }
+
+ /**
+ * Gets the image of this prototype's icon
+ *
+ * @return The icon's image
+ */
+ public Image getIcon() {
+ return getIconDescriptor().createImage();
+ }
+
+ /**
+ * Gets the categories of this view prototype
+ *
+ * @return The prototype's categories
+ */
+ public Collection<Category> getCategories() {
+ return configuration.getCategories();
+ }
+
+ /**
+ * Gets the initial view's root from the owner
+ *
+ * @param owner
+ * The initial view's owner
+ * @return The initial root
+ */
+ public EObject getRootFor(EObject owner) {
+ for (ModelRule rule : configuration.getModelRules()) {
+ if (rule.getAutoSelectPath() != null && rule.getAutoSelectPath().size() > 0) {
+ EObject result = traverse(owner, rule.getAutoSelectPath());
+ if (result != null)
+ return result;
+ }
+ }
+ return owner;
+ }
+
+ private EObject traverse(EObject from, EList<PathElement> path) {
+ EObject current = from;
+ for (PathElement elem : path) {
+ EReference feature = elem.getFeature();
+ if (current.eIsSet(feature)) {
+ Object temp = current.eGet(feature);
+ if (temp instanceof EList) {
+ current = ((EList<? extends EObject>) temp).get(0);
+ } else if (temp instanceof EObject) {
+ current = (EObject) temp;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+ return current;
+ }
+
+ /**
+ * Determines whether the instances of this prototype can change owners
+ *
+ * @return <code>true</code> if the owner is reassignable
+ */
+ public abstract boolean isOwnerReassignable();
+
+ /**
+ * Create a new view from this prototype with the given owner
+ *
+ * @param owner
+ * The new view's owner
+ * @return <code>true</code> if the instantiation succeeded
+ */
+ public abstract boolean instantiateOn(EObject owner);
+
+ /**
+ * Create a new view from this prototype with the given owner and name
+ *
+ * @param owner
+ * The new view's owner
+ * @param name
+ * The new view's name
+ * @return <code>true</code> if the instantiation succeeded
+ */
+ public abstract boolean instantiateOn(EObject owner, String name);
+
+ /**
+ * Gets the command for moving the given view to a new owner (target)
+ *
+ * @param view
+ * The view to be moved
+ * @param target
+ * The target owner
+ * @return The command, or <code>null</code> if the change is not allowed
+ */
+ public abstract Command getCommandChangeOwner(EObject view, EObject target);
+
+ /**
+ * Gets the command for changing the root element of the given view to a new element (target)
+ *
+ * @param view
+ * The view to change root
+ * @param target
+ * The target element
+ * @return The command, or <code>null</code> if the change is not allowed
+ */
+ public abstract Command getCommandChangeRoot(EObject view, EObject target);
+
+ /**
+ * Gets the object owning the given view
+ *
+ * @param view
+ * The view
+ * @return The view's owner
+ */
+ public abstract EObject getOwnerOf(EObject view);
+
+ /**
+ * Gets the object which is the root element of the given view
+ *
+ * @param view
+ * The view
+ * @return The views's root element
+ */
+ public abstract EObject getRootOf(EObject view);
+
+ /**
+ * Represents a comparator of prototypes
+ *
+ * @author Laurent Wouters
+ */
+ public static class Comp implements Comparator<ViewPrototype> {
+ /**
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(ViewPrototype arg0, ViewPrototype arg1) {
+ return (arg0.getLabel().compareTo(arg1.getLabel()));
+ }
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java
new file mode 100755
index 00000000000..a12c267315a
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Content provider of ViewPrototypes
+ *
+ * @author Laurent Wouters
+ *
+ */
+public class ViewPrototypeContentProvider implements ITreeContentProvider {
+
+ private static Image loadImage(String uri) {
+ URL url = null;
+ try {
+ url = new URL(uri);
+ } catch (MalformedURLException e) {
+ }
+ return ImageDescriptor.createFromURL(url).createImage();
+ }
+
+ public static class LP extends LabelProvider {
+
+ private Image imageCategory = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png");
+ private Image imageViewpoint = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png");
+ private Image imageProfile = loadImage("platform:/plugin/org.eclipse.papyrus.uml.profile/resources/icons/Profile.gif");
+ private Image imageModel = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png");
+ private Image imageOwner = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png");
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof Category)
+ return "Category " + ((Category) element).getName();
+ if (element instanceof ViewPrototype)
+ return ((ViewPrototype) element).getLabel();
+ if (element instanceof PapyrusViewpoint)
+ return "Available in viewpoint: " + ((PapyrusViewpoint) element).getName();
+ if (element instanceof EPackage)
+ return "Required profile: " + ((EPackage) element).getNsURI();
+ if (element instanceof ModelRule)
+ return getText((ModelRule) element);
+ if (element instanceof OwningRule)
+ return getText((OwningRule) element);
+ return element.toString();
+ }
+
+ private String getText(ModelRule rule) {
+ StringBuilder builder = new StringBuilder("Possible root: ");
+ boolean first = true;
+ for (EClass ste : rule.getStereotypes()) {
+ if (!first)
+ builder.append(", ");
+ builder.append("<<");
+ builder.append(ste.getEPackage().getNsPrefix());
+ builder.append("::");
+ builder.append(ste.getName());
+ builder.append(">>");
+ first = false;
+ }
+ if (rule.getElement() != null) {
+ if (!first)
+ builder.append(" ");
+ builder.append(rule.getElement().getEPackage().getNsPrefix());
+ builder.append("::");
+ builder.append(rule.getElement().getName());
+ }
+ return builder.toString();
+ }
+
+ private String getText(OwningRule rule) {
+ StringBuilder builder = new StringBuilder("Possible owner: ");
+ boolean first = true;
+ for (EClass ste : rule.getStereotypes()) {
+ if (!first)
+ builder.append(", ");
+ builder.append("<<");
+ builder.append(ste.getEPackage().getNsPrefix());
+ builder.append("::");
+ builder.append(ste.getName());
+ builder.append(">>");
+ first = false;
+ }
+ if (rule.getElement() != null) {
+ if (!first)
+ builder.append(" ");
+ builder.append(rule.getElement().getEPackage().getNsPrefix());
+ builder.append("::");
+ builder.append(rule.getElement().getName());
+ }
+ return builder.toString();
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof Category)
+ return imageCategory;
+ if (element instanceof ViewPrototype)
+ return ((ViewPrototype) element).getIcon();
+ if (element instanceof PapyrusViewpoint)
+ return imageViewpoint;
+ if (element instanceof EPackage)
+ return imageProfile;
+ if (element instanceof ModelRule)
+ return imageModel;
+ if (element instanceof OwningRule)
+ return imageOwner;
+ return null;
+ }
+ }
+
+ /**
+ * The root of all views
+ */
+ public static final Object treeRoot = new Object();
+
+ /**
+ * The views
+ */
+ private Map<Category, List<ViewPrototype>> views;
+
+ /**
+ * The categories
+ */
+ private List<Category> categories;
+
+ /**
+ * Creates the provider
+ *
+ * @param views
+ * The views to provide
+ */
+ public ViewPrototypeContentProvider() {
+ this.views = new HashMap<Category, List<ViewPrototype>>();
+ this.categories = new ArrayList<Category>();
+ for (ViewPrototype view : PolicyChecker.getCurrent().getAllPrototypes()) {
+ for (Category category : view.getCategories()) {
+ if (!categories.contains(category)) {
+ categories.add(category);
+ views.put(category, new ArrayList<ViewPrototype>());
+ }
+ views.get(category).add(view);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @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) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return categories.toArray();
+ }
+
+
+ private Object[] getChildren(ViewPrototype view) {
+ if (view.getConfiguration() == null)
+ return new String[0];
+ List<Object> data = new ArrayList<Object>();
+ data.add(view.getConfiguration().eContainer());
+ data.addAll(view.getConfiguration().getProfiles());
+ data.addAll(view.getConfiguration().getModelRules());
+ data.addAll(view.getConfiguration().getOwningRules());
+ return data.toArray();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object element) {
+ if (element == treeRoot)
+ return categories.toArray();
+ if (element instanceof Category)
+ return views.get((Category) element).toArray();
+ if (element instanceof ViewPrototype)
+ return getChildren((ViewPrototype) element);
+ return new Object[0];
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element == treeRoot)
+ return null;
+ if (element instanceof Category)
+ return treeRoot;
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ if (element == treeRoot)
+ return true;
+ if (element instanceof Category)
+ return true;
+ if (element instanceof ViewPrototype)
+ return true;
+ return false;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewpointExplorer.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewpointExplorer.java
new file mode 100755
index 00000000000..0198e5d56fb
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewpointExplorer.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * Eclipse view for the user to explore the current viewpoint
+ *
+ * @author Laurent Wouters
+ *
+ */
+public class ViewpointExplorer extends ViewPart {
+
+ private TreeViewer tree;
+
+ public ViewpointExplorer() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createPartControl(Composite parent) {
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+ parent.setLayout(gridLayout);
+
+ Composite inner = new Composite(parent, SWT.NONE);
+ inner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.FILL_VERTICAL));
+ inner.setLayout(new FillLayout());
+
+ tree = new TreeViewer(inner, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ tree.setLabelProvider(new ViewPrototypeContentProvider.LP());
+ tree.setSorter(getViewerSorter());
+ tree.setContentProvider(new ViewPrototypeContentProvider());
+ tree.setInput(ViewPrototypeContentProvider.treeRoot);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+
+ }
+
+
+ /**
+ * Gets the viewer sorter for this dialog
+ *
+ * @return A viewer sorter
+ */
+ private ViewerSorter getViewerSorter() {
+ return new ViewerSorter() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ if (e1 instanceof ViewPrototype) {
+ ViewPrototype b1 = (ViewPrototype) e1;
+ ViewPrototype b2 = (ViewPrototype) e2;
+ return b1.getFullLabel().compareTo(b2.getFullLabel());
+ }
+ return super.compare(viewer, e1, e2);
+ }
+ };
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/WeightedConfiguration.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/WeightedConfiguration.java
new file mode 100755
index 00000000000..97483b33144
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/WeightedConfiguration.java
@@ -0,0 +1,123 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.policy;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+
+
+/**
+ * Represents a Papyrus viewpoints configuration associated to a priority
+ *
+ * @author Laurent Wouters
+ */
+public class WeightedConfiguration {
+ /**
+ * ID of the extension point defining the configurations
+ */
+ private static final String EXTENSION_ID = "org.eclipse.papyrus.infra.viewpoints.policy.custom";
+
+ private String uri;
+ private int priority;
+ private PapyrusConfiguration config;
+
+ /**
+ * Gets the URI of the is configuration
+ *
+ * @return The configuration's URI
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * Gets the Papyrus configuration represented by this object
+ *
+ * @return A Papyrus Configuration
+ */
+ public PapyrusConfiguration getConfiguration() {
+ if (this.config == null)
+ this.config = PolicyChecker.loadConfigurationFrom(uri);
+ return this.config;
+ }
+
+ /**
+ * Initializes the configuration from the given configuration element
+ *
+ * @param config
+ * The extension point configuration element
+ */
+ private WeightedConfiguration(String plugin, IConfigurationElement config) {
+ this.uri = config.getAttribute("file");
+ if (!this.uri.startsWith(PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE))
+ this.uri = PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE + plugin + "/" + this.uri;
+ try {
+ this.priority = Integer.parseInt(config.getAttribute("priority"));
+ } catch (NumberFormatException ex) {
+ }
+ }
+
+
+ /**
+ * Represents a comparator for weighted configurations
+ *
+ * @author Laurent Wouters
+ */
+ private static class Comparator implements java.util.Comparator<WeightedConfiguration>, Serializable {
+ /**
+ * Serial version
+ */
+ private static final long serialVersionUID = 9025582514350440832L;
+
+ /**
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(WeightedConfiguration o1, WeightedConfiguration o2) {
+ return (o2.priority - o1.priority);
+ }
+ }
+
+ /**
+ * Gets the configuration with the top priority
+ *
+ * @return The appropriate configuration, or <code>null</code> if none was found
+ */
+ public static WeightedConfiguration getTopConfiguration() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint point = registry.getExtensionPoint(EXTENSION_ID);
+ IExtension[] extensions = point.getExtensions();
+
+ List<WeightedConfiguration> configs = new ArrayList<WeightedConfiguration>();
+ for (int i = 0; i != extensions.length; i++) {
+ String plugin = extensions[i].getContributor().getName();
+ IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+ for (int j = 0; j != elements.length; j++)
+ if (elements[j].getName().equals("configuration"))
+ configs.add(new WeightedConfiguration(plugin, elements[j]));
+ }
+ Collections.sort(configs, new Comparator());
+ if (configs.size() == 0)
+ return null;
+ return configs.get(0);
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.classpath b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.classpath
new file mode 100755
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.classpath
@@ -0,0 +1,7 @@
+<?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.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.project b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.project
new file mode 100755
index 00000000000..9c98c99a4f0
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.viewpoints.preferences</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000000..44217f8c068
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+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.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..bbf815d90f9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.preferences;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.preferences.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.common,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.facet.infra.common.core,
+ org.eclipse.papyrus.infra.core.pluginexplorer;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/about.html b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/about.html
new file mode 100755
index 00000000000..dd02e0be168
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 2, 2009</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/build.properties
index 785a40c0ec7..30e2cedf44d 100644..100755
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/build.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/build.properties
@@ -2,5 +2,7 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
+ plugin.xml,\
+ plugin.properties,\
about.html
src.includes = about.html
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.properties
index 9fe9194a1cd..2ba2af13e92 100644..100755
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/plugin.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.properties
@@ -1,10 +1,16 @@
-#################################################################################
-# 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
-#
-##################################################################################
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = RobotML profile and libraries (Incubation)
+##########################################################################################
+# 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:
+# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+#
+########################################################################################
+
+pluginName = Papyrus Viewpoints Preferences (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.xml b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.xml
new file mode 100755
index 00000000000..1ea8425cb0e
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.infra.viewpoints.preferences.ViewpointsPreferencePage"
+ id="org.eclipse.papyrus.infra.viewpoints.preferences.ViewpointsPreferencePage"
+ name="Viewpoints Configuration">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.infra.viewpoints.preferences.PreferenceInitializer">
+ </initializer>
+ </extension>
+
+</plugin>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/Activator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/Activator.java
index 6b24a3896d2..1157df96e8c 100644..100755
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/Activator.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/Activator.java
@@ -1,16 +1,17 @@
/*****************************************************************************
* 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests;
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.preferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -21,11 +22,11 @@ import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.pkg.tests"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.viewpoints.preferences"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -34,7 +35,6 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
@@ -44,7 +44,6 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
@@ -54,7 +53,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ResourceFieldEditor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ResourceFieldEditor.java
new file mode 100755
index 00000000000..ccdfd070ce5
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ResourceFieldEditor.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.preferences;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.StringButtonFieldEditor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.core.pluginexplorer.Plugin;
+import org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry;
+import org.eclipse.papyrus.infra.core.pluginexplorer.PluginsContentDialog;
+import org.eclipse.papyrus.infra.core.pluginexplorer.PluginsContentSelectionValidator;
+import org.eclipse.papyrus.infra.viewpoints.policy.PreferenceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.model.BaseWorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * Represents the preference field for the custom configuration selection
+ * @author Laurent Wouters
+ */
+public class ResourceFieldEditor extends StringButtonFieldEditor {
+
+ /**
+ * Absolute path selection mode
+ */
+ public static final int MODE_FILE = 0;
+ /**
+ * Workspace resource selection mode
+ */
+ public static final int MODE_WORKSPACE = 1;
+ /**
+ * Plugin's resource selection mode
+ */
+ public static final int MODE_PLUGIN = 2;
+
+ protected String[] extensions;
+ protected int mode;
+
+ /**
+ * Initializes this field
+ * @param name The field's name
+ * @param labelText The displayed label
+ * @param parent The parent component
+ */
+ public ResourceFieldEditor(String name, String labelText, Composite parent) {
+ init(name, labelText);
+ this.extensions = new String[] { "*.configuration" };
+ this.mode = 0;
+ setErrorMessage(JFaceResources.getString("FileFieldEditor.errorMessage"));//$NON-NLS-1$
+ setChangeButtonText(JFaceResources.getString("openBrowse"));//$NON-NLS-1$
+ createControl(parent);
+ }
+
+ /**
+ * Changes the field mode
+ * @param mode The new mode
+ */
+ public void setMode(int mode) {
+ this.mode = mode;
+ }
+
+ /* (non-Javadoc)
+ * Method declared on StringButtonFieldEditor.
+ * Opens the file chooser dialog and returns the selected file.
+ */
+ protected String changePressed() {
+ switch (mode) {
+ case MODE_FILE:
+ return selectFile();
+ case MODE_WORKSPACE:
+ return selectInWorkspace();
+ case MODE_PLUGIN:
+ return selectInPlugin();
+ default:
+ return selectFile();
+ }
+ }
+
+ private String selectFile() {
+ FileDialog dialog = new FileDialog(getShell(), SWT.OPEN | SWT.SHEET);
+ dialog.setFilterExtensions(extensions);
+ String value = getTextControl().getText();
+ if (value != null && !value.isEmpty())
+ dialog.setFileName(value);
+ value = dialog.open();
+ if (value != null) {
+ value = value.trim();
+ if (value.length() > 0) {
+ File f = new File(value);
+ return f.getAbsolutePath();
+ }
+ }
+ return null;
+ }
+
+ private String selectInWorkspace() {
+ ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
+ dialog.setTitle("Configuration Selection");
+ dialog.setMessage("Select the custom configuration resource:");
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setValidator(new ISelectionStatusValidator() {
+ public IStatus validate(Object[] selection) {
+ if (selection == null || selection.length == 0)
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No selected item!");
+ if (selection.length > 1)
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Only one item should be selected!");
+ if (!(selection[0] instanceof IFile))
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected item is not a configuration file!");
+ IFile file = (IFile)selection[0];
+ if (!file.getName().endsWith(".configuration"))
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The selected item is not a configuration file!");
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, "");
+ }
+ });
+ int value = dialog.open();
+ if (value != ElementTreeSelectionDialog.OK)
+ return null;
+ IFile file = (IFile)dialog.getFirstResult();
+ return PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE + file.getProject().getName() + "/" + file.getProjectRelativePath().toString();
+ }
+
+ private String selectInPlugin() {
+ PluginsContentDialog dialog = new PluginsContentDialog(getShell(), new PluginsContentSelectionValidator() {
+ public boolean isValid(Plugin plugin) { return false; }
+ public boolean isValid(PluginEntry entry) {
+ return entry.getName().endsWith(".configuration");
+ }
+ }, "Viewpoints configuration selection", "Select a configuration resource (*.configuration):");
+ int result = dialog.open();
+ if (result != Window.OK)
+ return null;
+ PluginEntry entry = (PluginEntry)dialog.getSelection();
+ if (entry == null)
+ return null;
+ return entry.getLogicalPath();
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/UpdatableComboBoxFieldEditor.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/UpdatableComboBoxFieldEditor.java
new file mode 100755
index 00000000000..bae2b26b952
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/UpdatableComboBoxFieldEditor.java
@@ -0,0 +1,232 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Represents a preference combo field, which content can be updated
+ * @author Laurent Wouters
+ */
+public class UpdatableComboBoxFieldEditor extends FieldEditor {
+
+ private Control label;
+ private Combo widget;
+ private EObject prefValue;
+ private List<EObject> data;
+ private EAttribute attribute;
+
+ /**
+ * Initializes the field
+ * @param preference The target preference
+ * @param label The displayed label
+ * @param parent The parent component
+ */
+ public UpdatableComboBoxFieldEditor(String preference, String label, Composite parent) {
+ init(preference, label);
+ this.data = new ArrayList<EObject>();
+ this.label = getLabelControl(parent);
+ this.widget = new Combo(parent, SWT.READ_ONLY);
+ this.widget.setFont(parent.getFont());
+ this.widget.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent evt) {
+ EObject oldValue = prefValue;
+ prefValue = null;
+ String name = widget.getText();
+ if (name != null) {
+ for (EObject obj : data) {
+ if (name.equals(getLabelFor(obj))) {
+ prefValue = obj;
+ break;
+ }
+ }
+ }
+ setPresentsDefaultValue(false);
+ fireValueChanged(VALUE, oldValue, prefValue);
+ }
+ });
+ createControl(parent);
+ }
+
+ /**
+ * Gets the selected value
+ * @return The selection
+ */
+ public EObject getSelection() { return prefValue; }
+
+ /**
+ * Sets the selected value
+ * @param obj The selection as an EObject
+ */
+ public void setSelection(EObject obj) {
+ prefValue = obj;
+ widget.setText(getLabelFor(prefValue));
+ }
+
+ /**
+ * Sets the selected value
+ * @param value The selection as its display value
+ */
+ public void setSelection(String value) {
+ load(value);
+ }
+
+
+ /**
+ * Changes the content of the combo
+ * @param data The new data
+ * @param attribute The attribute used to get readable text from the data
+ */
+ public void setContent(List<? extends EObject> data, EAttribute attribute) {
+ this.data = new ArrayList<EObject>(data);
+ this.attribute = attribute;
+ widget.removeAll();
+ for (EObject obj : this.data)
+ widget.add(getLabelFor(obj));
+ prefValue = this.data.get(0);
+ widget.setText(getLabelFor(prefValue));
+ }
+
+ /**
+ * Removes all content
+ */
+ public void clearContent() {
+ data = new ArrayList<EObject>();
+ prefValue = null;
+ widget.removeAll();
+ }
+
+ /**
+ * Gets the string representation of the given object
+ * @param object An object
+ * @return Its string representation
+ */
+ private String getValueFor(EObject object) {
+ Object value = object.eGet(attribute);
+ return (value == null ? null : value.toString());
+ }
+
+ /**
+ * Gets the display string of the given object
+ * @param object An object
+ * @return The display string
+ */
+ private String getLabelFor(EObject object) {
+ Object value = object.eGet(attribute);
+ return (value == null ? null : value.toString());
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int)
+ */
+ protected void adjustForNumColumns(int numColumns) {
+ return;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int)
+ */
+ protected void doFillIntoGrid(Composite parent, int numColumns) {
+ int comboC = 1;
+ if (numColumns > 1) {
+ comboC = numColumns - 1;
+ }
+ GridData gd = new GridData();
+ gd.horizontalSpan = 1;
+ label.setLayoutData(gd);
+
+ gd = new GridData();
+ gd.horizontalSpan = comboC;
+ gd.horizontalAlignment = GridData.FILL;
+ widget.setLayoutData(gd);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#doLoad()
+ */
+ protected void doLoad() {
+ load(getPreferenceStore().getString(getPreferenceName()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault()
+ */
+ protected void doLoadDefault() {
+ load(getPreferenceStore().getDefaultString(getPreferenceName()));
+ }
+
+ /**
+ * Loads the display data from the given value for selection
+ * @param value
+ */
+ private void load(String value) {
+ prefValue = null;
+ if (value != null) {
+ for (EObject obj : data) {
+ if (value.equals(getValueFor(obj))) {
+ prefValue = obj;
+ widget.setText(getLabelFor(obj));
+ return;
+ }
+ }
+ }
+ if (data.size() > 0) {
+ prefValue = data.get(0);
+ widget.setText(getLabelFor(prefValue));
+ } else {
+ widget.setText(null);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#doStore()
+ */
+ protected void doStore() {
+ if (prefValue == null) {
+ getPreferenceStore().setToDefault(getPreferenceName());
+ return;
+ }
+ getPreferenceStore().setValue(getPreferenceName(), getValueFor(prefValue));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls()
+ */
+ public int getNumberOfControls() {
+ return 2;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean,
+ * org.eclipse.swt.widgets.Composite)
+ */
+ public void setEnabled(boolean enabled, Composite parent) {
+ super.setEnabled(enabled, parent);
+ widget.setEnabled(enabled);
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ViewpointsPreferencePage.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ViewpointsPreferencePage.java
new file mode 100755
index 00000000000..8383de38e26
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences/src/org/eclipse/papyrus/infra/viewpoints/preferences/ViewpointsPreferencePage.java
@@ -0,0 +1,295 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.viewpoints.preferences;
+
+import java.util.List;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Iso42010Package;
+import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.PreferenceConstants;
+import org.eclipse.papyrus.infra.viewpoints.policy.WeightedConfiguration;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Represents the preference page for the viewpoints configuration
+ * @author Laurent Wouters
+ */
+public class ViewpointsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ private PapyrusConfiguration currentConfig;
+ private boolean customConfig;
+ private String scheme;
+
+ private RadioGroupFieldEditor fieldType;
+ private ComboFieldEditor fieldScheme;
+ private ResourceFieldEditor fieldPath;
+ private BooleanFieldEditor fieldForceMultiplicity;
+ private UpdatableComboBoxFieldEditor fieldStakeholder;
+ private UpdatableComboBoxFieldEditor fieldViewpoint;
+ private Label labelConfig;
+ private Group groupCustom;
+ private Group groupVP;
+
+ public ViewpointsPreferencePage() {
+ super(GRID);
+ setPreferenceStore(PolicyChecker.getPreferences());
+ setDescription("Preference page for the configuration of Papyrus viewpoints");
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of
+ * the common GUI blocks needed to manipulate various types
+ * of preferences. Each field editor knows how to save and
+ * restore itself.
+ */
+ public void createFieldEditors() {
+ IPreferenceStore store = getPreferenceStore();
+ currentConfig = PolicyChecker.getCurrent().getConfiguration();
+ String valueType = store.getString(PreferenceConstants.P_CONF_TYPE);
+ scheme = store.getString(PreferenceConstants.P_CONF_PATH_SCHEME);
+ if (scheme == null || scheme.isEmpty())
+ scheme = PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE;
+
+ fieldType = new RadioGroupFieldEditor(PreferenceConstants.P_CONF_TYPE, "Configuration selection:", 1, new String[][]{
+ { PreferenceConstants.P_CONF_TYPE_DEFAULT_LABEL, PreferenceConstants.P_CONF_TYPE_DEFAULT_VALUE },
+ { PreferenceConstants.P_CONF_TYPE_EXTENSION_LABEL, PreferenceConstants.P_CONF_TYPE_EXTENSION_VALUE },
+ { PreferenceConstants.P_CONF_TYPE_USER_DEFINED_LABEL, PreferenceConstants.P_CONF_TYPE_USER_DEFINED_VALUE}
+ }, getFieldEditorParent(), true);
+
+ GridData gd = new GridData();
+ gd.horizontalSpan = 3;
+ gd.horizontalAlignment = GridData.FILL;
+ Composite rest = new Composite(getFieldEditorParent(), SWT.SHADOW_NONE);
+ rest.setLayout(new FillLayout(SWT.VERTICAL));
+ rest.setLayoutData(gd);
+
+ groupCustom = new Group(rest, SWT.SHADOW_ETCHED_IN);
+ groupCustom.setText(PreferenceConstants.P_CONF_TYPE_USER_DEFINED_LABEL + ":");
+
+ fieldScheme = new ComboFieldEditor(PreferenceConstants.P_CONF_PATH_SCHEME, "Access scheme:", new String[][]{
+ { PreferenceConstants.P_CONF_PATH_SCHEME_FILE_LABEL, PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE },
+ { PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_LABEL, PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE },
+ { PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_LABEL, PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE }
+ }, groupCustom);
+ fieldScheme.setEnabled(PreferenceConstants.P_CONF_TYPE_USER_DEFINED_VALUE.equals(valueType), groupCustom);
+
+ fieldPath = new ResourceFieldEditor(PreferenceConstants.P_CONF_PATH, "&Path:", groupCustom);
+ fieldPath.setMode(0);
+ fieldPath.setEnabled(PreferenceConstants.P_CONF_TYPE_USER_DEFINED_VALUE.equals(valueType), groupCustom);
+ if (PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_FILE);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_WORKSPACE);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_PLUGIN);
+ }
+
+ groupVP = new Group(rest, SWT.SHADOW_ETCHED_IN);
+ groupVP.setText("Viewpoint selection:");
+
+ gd = new GridData();
+ gd.horizontalSpan = 1;
+ Label titleConf = new Label(groupVP, SWT.LEFT);
+ titleConf.setText("Configuration:");
+ titleConf.setLayoutData(gd);
+
+ gd = new GridData();
+ gd.horizontalSpan = 1;
+ gd.horizontalAlignment = GridData.FILL;
+ labelConfig = new Label(groupVP, SWT.LEFT);
+ if (PreferenceConstants.P_CONF_TYPE_DEFAULT_VALUE.equals(valueType))
+ labelConfig.setText("Builtin");
+ else if (PreferenceConstants.P_CONF_TYPE_EXTENSION_VALUE.equals(valueType)) {
+ WeightedConfiguration config = WeightedConfiguration.getTopConfiguration();
+ labelConfig.setText((config == null) ? "No suitable configuration" : config.getURI());
+ } else if (PreferenceConstants.P_CONF_TYPE_USER_DEFINED_VALUE.equals(valueType))
+ labelConfig.setText(store.getString(PreferenceConstants.P_CONF_PATH));
+ labelConfig.setLayoutData(gd);
+
+ gd = new GridData();
+ gd.horizontalSpan = 1;
+ Label labelMulti = new Label(groupVP, SWT.LEFT);
+ labelMulti.setText("Multiplicity:");
+ labelMulti.setLayoutData(gd);
+ fieldForceMultiplicity = new BooleanFieldEditor(PreferenceConstants.P_FORCE_MULTIPLICITY, PreferenceConstants.P_FORCE_MULTIPLICITY_LABEL, groupVP);
+
+
+ fieldStakeholder = new UpdatableComboBoxFieldEditor(PreferenceConstants.P_STAKEHOLDER, "&Stakeholder:", groupVP);
+ fieldStakeholder.setContent(currentConfig.getStakeholders(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+
+ fieldViewpoint = new UpdatableComboBoxFieldEditor(PreferenceConstants.P_VIEWPOINT, "&Viewpoint:", groupVP);
+ fieldViewpoint.setContent(PolicyChecker.getCurrent().getStakeholder().getViewpoints(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+
+ addField(fieldType);
+ addField(fieldScheme);
+ addField(fieldPath);
+ addField(fieldStakeholder);
+ addField(fieldViewpoint);
+
+ }
+
+ @Override
+ protected void checkState() {
+ super.checkState();
+ if (currentConfig == null || fieldViewpoint.getSelection() == null || fieldStakeholder.getSelection() == null) {
+ this.setMessage("The currently selected configuration does not provide adequate viewpoints", ERROR);
+ setValid(false);
+ } else {
+ this.setMessage(null, NONE);
+ setValid(true);
+ }
+ }
+
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ customConfig = false;
+ WeightedConfiguration config = WeightedConfiguration.getTopConfiguration();
+ currentConfig = (config != null ? config.getConfiguration() : PolicyChecker.getDefaultConfiguration());
+ fieldPath.setStringValue("");
+ labelConfig.setText((config == null) ? "Builtin default" : config.getURI());
+ fieldPath.setEnabled(false, groupCustom);
+ fieldScheme.setEnabled(false, groupCustom);
+ if (currentConfig != null) {
+ List<Stakeholder> list = currentConfig.getStakeholders();
+ fieldStakeholder.setContent(list, Iso42010Package.Literals.AD_ELEMENT__NAME);
+ fieldViewpoint.setContent(list.get(0).getViewpoints(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+ } else {
+ fieldStakeholder.clearContent();
+ fieldViewpoint.clearContent();
+ }
+ }
+
+ @Override
+ public boolean performOk() {
+ boolean result = super.performOk();
+ if (!result)
+ return false;
+ if (currentConfig == null || fieldViewpoint.getSelection() == null || fieldStakeholder.getSelection() == null)
+ return false;
+ PolicyChecker newPolicy = new PolicyChecker(currentConfig, (PapyrusViewpoint)fieldViewpoint.getSelection(), fieldForceMultiplicity.getBooleanValue());
+ PolicyChecker.setCurrent(newPolicy);
+ return true;
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ super.propertyChange(event);
+ if (event.getSource() == fieldType) {
+ onChangeType(event);
+ } else if (event.getSource() == fieldScheme) {
+ onChangeScheme(event);
+ } else if (event.getSource() == fieldPath) {
+ onChangePath(event);
+ } else if (event.getSource() == fieldStakeholder) {
+ onChangeStakeholder(event);
+ }
+ checkState();
+ }
+
+ private void onChangeType(PropertyChangeEvent event) {
+ currentConfig = null;
+ if (PreferenceConstants.P_CONF_TYPE_DEFAULT_VALUE.equals(event.getNewValue())) {
+ customConfig = false;
+ currentConfig = PolicyChecker.getDefaultConfiguration();
+ fieldPath.setStringValue("");
+ labelConfig.setText("Builtin default");
+ } else if (PreferenceConstants.P_CONF_TYPE_EXTENSION_VALUE.equals(event.getNewValue())) {
+ customConfig = false;
+ WeightedConfiguration config = WeightedConfiguration.getTopConfiguration();
+ currentConfig = (config != null ? config.getConfiguration() : PolicyChecker.getDefaultConfiguration());
+ fieldPath.setStringValue("");
+ labelConfig.setText((config == null) ? "Builtin default" : config.getURI());
+ } else if (PreferenceConstants.P_CONF_TYPE_USER_DEFINED_VALUE.equals(event.getNewValue())) {
+ customConfig = true;
+ labelConfig.setText("...");
+ }
+ fieldPath.setEnabled(customConfig, groupCustom);
+ fieldScheme.setEnabled(customConfig, groupCustom);
+ if (currentConfig != null) {
+ List<Stakeholder> list = currentConfig.getStakeholders();
+ fieldStakeholder.setContent(list, Iso42010Package.Literals.AD_ELEMENT__NAME);
+ fieldViewpoint.setContent(list.get(0).getViewpoints(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+ } else {
+ fieldStakeholder.clearContent();
+ fieldViewpoint.clearContent();
+ }
+ }
+
+ private void onChangeScheme(PropertyChangeEvent event) {
+ scheme = event.getNewValue().toString();
+ fieldPath.setStringValue("");
+ if (PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_FILE);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_WORKSPACE);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE.equals(scheme)) {
+ fieldPath.setMode(ResourceFieldEditor.MODE_PLUGIN);
+ }
+ }
+
+ private void onChangePath(PropertyChangeEvent event) {
+ if (!customConfig)
+ return;
+ String path = event.getNewValue().toString();
+ currentConfig = null;
+ if (path != null && !path.isEmpty()) {
+ if (PreferenceConstants.P_CONF_PATH_SCHEME_FILE_VALUE.equals(scheme)) {
+ currentConfig = PolicyChecker.loadConfigurationFrom(path);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_WORKSPACE_VALUE.equals(scheme)) {
+ currentConfig = PolicyChecker.loadConfigurationFrom(path);
+ } else if (PreferenceConstants.P_CONF_PATH_SCHEME_PLUGIN_VALUE.equals(scheme)) {
+ currentConfig = PolicyChecker.loadConfigurationFrom(path);
+ }
+ labelConfig.setText(path);
+ }
+ if (currentConfig != null) {
+ List<Stakeholder> list = currentConfig.getStakeholders();
+ fieldStakeholder.setContent(list, Iso42010Package.Literals.AD_ELEMENT__NAME);
+ fieldViewpoint.setContent(list.get(0).getViewpoints(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+ } else {
+ fieldStakeholder.clearContent();
+ fieldViewpoint.clearContent();
+ }
+ }
+
+ private void onChangeStakeholder(PropertyChangeEvent event) {
+ Object value = event.getNewValue();
+ if (value != null) {
+ Stakeholder stakeholder = (Stakeholder)value;
+ fieldViewpoint.setContent(stakeholder.getViewpoints(), Iso42010Package.Literals.AD_ELEMENT__NAME);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) { }
+} \ No newline at end of file
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
index adca22ec8af..e10010b14ff 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
@@ -35,7 +35,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0"
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.sysml.diagram.blockdefinition,
org.eclipse.papyrus.sysml.diagram.blockdefinition.command,
org.eclipse.papyrus.sysml.diagram.blockdefinition.dnd.helper,
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml
index f96efcad785..a733e4a5bb7 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.xml
@@ -38,48 +38,6 @@
</extension>
<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
- icon="icons/obj16/Diagram_BlockDefinition.gif" label="Create a new Block Definition Diagram"
- style="push" tooltip="Create a new Block Definition Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
- icon="icons/obj16/Diagram_BlockDefinition.gif" label="Create a new Block Definition Diagram"
- style="push" tooltip="Create a new Block Definition Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
- icon="icons/obj16/Diagram_BlockDefinition.gif"
- label="Create a new Block Definition Diagram"
- style="push"
- tooltip="Create a new Block Definition Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders"
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java
index 0b821dc8a8b..5762d728927 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCreateCommand.java
@@ -7,27 +7,28 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.blockdefinition;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.provider.ElementTypes;
+/**
+ * Represents the creation command for a SysML block definition diagram
+ * @author Laurent Wouters
+ */
public class BlockDefinitionDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
/**
* {@inheritDoc}
*/
@Override
protected String getDefaultDiagramName() {
- return "NewDiagram"; // //$NON-NLS-1$
+ return "New Block Definition Diagram"; // //$NON-NLS-1$
}
/**
@@ -45,14 +46,4 @@ public class BlockDefinitionDiagramCreateCommand extends AbstractPapyrusGmfCreat
protected PreferencesHint getPreferenceHint() {
return Activator.DIAGRAM_PREFERENCES_HINT;
}
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
- // Start of user code Custom diagram creation
- return super.createDiagram(diagramResource, owner, name);
- // End of user code
- }
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java
index ab73a3a7606..e428045b47d 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramCondition.java
@@ -9,15 +9,13 @@
* Contributors:
*
* CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.blockdefinition;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
-import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
-import org.eclipse.uml2.uml.util.UMLUtil;
/**
* BlockDefinitionDiagramCondition to set conditions for the diagram creation
@@ -28,15 +26,6 @@ public class BlockDefinitionDiagramCondition extends PerspectiveContextDependenc
* {@inheritDoc}
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- if(selectedElement instanceof org.eclipse.uml2.uml.Package) {
- org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package)selectedElement;
- if(pack.getAllAppliedProfiles().contains(UMLUtil.getProfile(BlocksPackage.eINSTANCE, pack))
- && pack.getAllAppliedProfiles().contains(UMLUtil.getProfile(PortandflowsPackage.eINSTANCE, pack))) {
- return true;
- }
- }
- }
return false;
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/CreateBlockDefinitionDiagramWithNavigationHandler.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/CreateBlockDefinitionDiagramWithNavigationHandler.java
deleted file mode 100644
index 7f0736c872a..00000000000
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src/org/eclipse/papyrus/sysml/diagram/blockdefinition/CreateBlockDefinitionDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.blockdefinition;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateBlockDefinitionDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateBlockDefinitionDiagramWithNavigationHandler() {
- super(new BlockDefinitionDiagramCreateCommand(), new BlockDefinitionDiagramCondition());
- }
-
-}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
index 0ef0093f596..09371dfb664 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
@@ -32,7 +32,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
- org.eclipse.papyrus.uml.diagram.common
+ org.eclipse.papyrus.uml.diagram.common,
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.sysml.diagram.internalblock,
org.eclipse.papyrus.sysml.diagram.internalblock.compatibility,
org.eclipse.papyrus.sysml.diagram.internalblock.dnd.helper,
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml
index 4c28c5165b4..006ed0354f6 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/plugin.xml
@@ -13,48 +13,8 @@
<command id="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" name="Create a new Internal Block Diagram" description="Create a new Internal Block Diagram" categoryId="org.eclipse.papyrus.editor.category"></command>
</extension>
-<extension point="org.eclipse.ui.handlers">
- <handler class="org.eclipse.papyrus.sysml.diagram.internalblock.CreateInternalBlockDiagramWithNavigationHandler" commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"></equals>
- </with>
- </activeWhen>
- </handler>
-</extension>
<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" icon="icons/obj16/Diagram_InternalBlock.gif" label="Create a new Internal Block Diagram" style="push" tooltip="Create a new Internal Block Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"></reference>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" icon="icons/obj16/Diagram_InternalBlock.gif" label="Create a new Internal Block Diagram" style="push" tooltip="Create a new Internal Block Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"></reference>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.sysml.diagram.internalblock.CreateCommand" icon="icons/obj16/Diagram_InternalBlock.gif" label="Create a new Internal Block Diagram" style="push" tooltip="Create a new Internal Block Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysMLBlocks"></reference>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
<!-- Palette tool definition (defines tools possibly used by the palette(s)) -->
<extension point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders" name="SYSML_InternalBlock_Predefined_Entries" id="org.eclipse.papyrus.sysml.diagram.blockdefinition.palettedefinition">
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java
index 2e4be9f1c20..a92567f3942 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCreateCommand.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
* CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.internalblock;
@@ -31,6 +31,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramC
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
import org.eclipse.papyrus.sysml.diagram.internalblock.provider.ElementTypes;
@@ -40,18 +41,19 @@ import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.util.UMLUtil;
-// Start of user code custom imports
-
-// End of user code
+/**
+ * Represents the creation command for a SysML internal block diagram
+ * @author Laurent Wouters
+ */
public class InternalBlockDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
/**
* {@inheritDoc}
*/
@Override
protected String getDefaultDiagramName() {
- return "NewDiagram"; //$NON-NLS-1$
+ return "New Internal Block Diagram"; //$NON-NLS-1$
}
/**
@@ -74,27 +76,27 @@ public class InternalBlockDiagramCreateCommand extends AbstractPapyrusGmfCreateD
* {@inheritDoc}
*/
@Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
// Start of user code Custom diagram creation
Diagram diagram = null;
- if(owner instanceof org.eclipse.uml2.uml.Class) {
- org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class)owner;
+ if (element instanceof org.eclipse.uml2.uml.Class) {
+ org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class)element;
Block block = UMLUtil.getStereotypeApplication(cOwner, Block.class);
if(block != null) {
- canvasDomainElement = (EObject)owner;
- Package owningPackage = ((Element)owner).getNearestPackage();
- diagram = super.createDiagram(diagramResource, owningPackage, name);
+ canvasDomainElement = (EObject)element;
+ Package owningPackage = ((Element)element).getNearestPackage();
+ diagram = super.doCreateDiagram(diagramResource, owner, owningPackage, prototype, name);
}
- } else if(owner instanceof Package) {
+ } else if (element instanceof Package) {
try {
canvasDomainElement = null;
- IEditCommandRequest request = new CreateElementRequest((Package)owner, SysMLElementTypes.BLOCK);
- IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(owner);
+ IEditCommandRequest request = new CreateElementRequest((Package)element, SysMLElementTypes.BLOCK);
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(element);
if(commandService == null) {
return null;
}
@@ -104,7 +106,7 @@ public class InternalBlockDiagramCreateCommand extends AbstractPapyrusGmfCreateD
createElementCommand.execute(new NullProgressMonitor(), null);
EObject block = GMFCommandUtils.getCommandEObjectResult(createElementCommand);
canvasDomainElement = block;
- diagram = super.createDiagram(diagramResource, (Package)owner, name);
+ diagram = super.doCreateDiagram(diagramResource, owner, (Package)element, prototype, name);
}
} catch (ExecutionException e) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/CreateInternalBlockDiagramWithNavigationHandler.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/CreateInternalBlockDiagramWithNavigationHandler.java
deleted file mode 100644
index e28547f8d72..00000000000
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/CreateInternalBlockDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.internalblock;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateInternalBlockDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateInternalBlockDiagramWithNavigationHandler() {
- super(new InternalBlockDiagramCreateCommand(), new InternalBlockDiagramCondition());
- }
-
-}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java
index 51430cfea7a..276607b58d1 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramCondition.java
@@ -7,16 +7,14 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
* CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.internalblock;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.papyrus.sysml.blocks.Block;
-import org.eclipse.uml2.uml.util.UMLUtil;
/**
* InternalBlockDiagramCondition to set conditions for the diagram creation
@@ -28,14 +26,6 @@ public class InternalBlockDiagramCondition extends PerspectiveContextDependence
*/
@Override
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- if(selectedElement instanceof org.eclipse.uml2.uml.Class) {
- org.eclipse.uml2.uml.Class clazz = (org.eclipse.uml2.uml.Class)selectedElement;
- if(UMLUtil.getStereotypeApplication(clazz, Block.class) != null) {
- return true;
- }
- }
- }
return false;
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
index 5e2d1dc918d..7b7ed041cc8 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
@@ -1,4 +1,4 @@
-Manifest-Version: 1.0
+Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.sysml.diagram.parametric,
org.eclipse.papyrus.sysml.diagram.parametric.commands,
org.eclipse.papyrus.sysml.diagram.parametric.edit.part,
@@ -15,46 +15,48 @@ Bundle-ActivationPolicy: lazy
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
org.eclipse.papyrus.sysml;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.emf.common.ui;bundle-version="2.5.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.emf.common.ui;bundle-version="2.5.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
org.eclipse.papyrus.uml.diagram.composite;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.3.0",
org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.core.expressions,
+ org.eclipse.core.expressions,
org.eclipse.papyrus.sysml.service.types;bundle-version="1.0.0",
org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
org.eclipse.papyrus.sysml.diagram.common;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
org.eclipse.papyrus.views.properties;bundle-version="1.0.0",
- org.eclipse.core.databinding.observable;bundle-version="1.4.1",
- org.eclipse.papyrus.views.properties.model;bundle-version="1.0.0"
+ org.eclipse.core.databinding.observable;bundle-version="1.4.1",
+ org.eclipse.papyrus.views.properties.model;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-Version: 1.0.0.qualifier
-Bundle-ManifestVersion: 2
+Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.sysml.diagram.parametric.Activat
or
Bundle-SymbolicName: org.eclipse.papyrus.sysml.diagram.parametric;sing
leton:=true
-Import-Package: org.eclipse.gmf.runtime.notation
+Import-Package: org.eclipse.gmf.runtime.notation
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml
index 5d692b0f0e7..90703712cbc 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/plugin.xml
@@ -46,59 +46,10 @@
name="Show/Hide Constraint expression"/>
</extension>
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.sysml.diagram.parametric.CreateParametricDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
<!-- Diagram creation command registration in menu and toolbar -->
<extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand"
- icon="icons/obj16/Diagram_Parametric.png" label="Create a new Parametric Diagram"
- style="push" tooltip="Create a new Parametric Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand"
- icon="icons/obj16/Diagram_Parametric.png" label="Create a new Parametric Diagram"
- style="push" tooltip="Create a new Parametric Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.sysml.diagram.parametric.CreateCommand"
- icon="icons/obj16/Diagram_Parametric.png"
- label="Create a new Parametric Diagram"
- style="push"
- tooltip="Create a new Parametric Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
<menuContribution locationURI="popup:org.eclipse.papyrus.uml.diagram.ui.popupmenu.format">
<menu
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java
index dd2a875a2a8..a8302d4f326 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCreateCommand.java
@@ -9,6 +9,7 @@
* Contributors:
* Régis CHEVREL: chevrel.regis <at> gmail.com
* CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.parametric;
@@ -31,6 +32,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramC
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.services.edit.utils.GMFCommandUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLGraphicalTypes;
import org.eclipse.papyrus.sysml.diagram.parametric.provider.ElementTypes;
@@ -41,17 +43,18 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.util.UMLUtil;
-// Start of user code custom imports
-// End of user code
-
+/**
+ * Represents a creation command for a SysML parametric diagram
+ * @author Laurent Wouters
+ */
public class ParametricDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
/**
* {@inheritDoc}
*/
@Override
protected String getDefaultDiagramName() {
- return "NewParametricDiagram"; //$NON-NLS-1$
+ return "New Parametric Diagram"; //$NON-NLS-1$
}
/**
@@ -74,27 +77,26 @@ public class ParametricDiagramCreateCommand extends AbstractPapyrusGmfCreateDiag
* {@inheritDoc}
*/
@Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
// Start of user code Custom diagram creation
Diagram diagram = null;
- if(owner instanceof org.eclipse.uml2.uml.Class) {
- org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class)owner;
+ if (element instanceof org.eclipse.uml2.uml.Class) {
+ org.eclipse.uml2.uml.Class cOwner = (org.eclipse.uml2.uml.Class)element;
Block block = UMLUtil.getStereotypeApplication(cOwner, Block.class);
if(block != null) {
- canvasDomainElement = (EObject)owner;
- Package owningPackage = ((Element)owner).getNearestPackage();
- diagram = super.createDiagram(diagramResource, owningPackage, name);
+ canvasDomainElement = (EObject)element;
+ Package owningPackage = ((Element)element).getNearestPackage();
+ diagram = super.doCreateDiagram(diagramResource, owner, owningPackage, prototype, name);
}
- } else if(owner instanceof Package) {
+ } else if (element instanceof Package) {
try {
canvasDomainElement = null;
-
- IEditCommandRequest request = new CreateElementRequest((Package)owner, SysMLElementTypes.BLOCK);
- IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(owner);
+ IEditCommandRequest request = new CreateElementRequest((Package)element, SysMLElementTypes.BLOCK);
+ IElementEditService commandService = ElementEditServiceUtils.getCommandProvider(element);
if(commandService == null) {
return null;
}
@@ -104,7 +106,7 @@ public class ParametricDiagramCreateCommand extends AbstractPapyrusGmfCreateDiag
createElementCommand.execute(new NullProgressMonitor(), null);
EObject block = GMFCommandUtils.getCommandEObjectResult(createElementCommand);
canvasDomainElement = block;
- diagram = super.createDiagram(diagramResource, (Package)owner, name);
+ diagram = super.doCreateDiagram(diagramResource, owner, (Package)element, prototype, name);
}
} catch (ExecutionException e) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/CreateParametricDiagramWithNavigationHandler.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/CreateParametricDiagramWithNavigationHandler.java
deleted file mode 100644
index a116905a594..00000000000
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/CreateParametricDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * 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:
- * Régis CHEVREL: chevrel.regis <at> gmail.com
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.parametric;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateParametricDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateParametricDiagramWithNavigationHandler() {
- super(new ParametricDiagramCreateCommand(), new ParametricDiagramCondition());
- }
-
-}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java
index ec094bdaa2d..db8c22d2667 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramCondition.java
@@ -9,14 +9,13 @@
* Contributors:
* chevrel.regis@gmail.com
* CEA LIST - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.parametric;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.papyrus.sysml.blocks.Block;
-import org.eclipse.uml2.uml.util.UMLUtil;
/**
* ParametricDiagramCondition to set conditions for the diagram creation
@@ -28,19 +27,6 @@ public class ParametricDiagramCondition extends PerspectiveContextDependence {
*/
@Override
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- // Could create a Parametric Diagram on a Block
- if(selectedElement instanceof org.eclipse.uml2.uml.Class) {
- org.eclipse.uml2.uml.Class clazz = (org.eclipse.uml2.uml.Class)selectedElement;
- if(UMLUtil.getStereotypeApplication(clazz, Block.class) != null) {
- return true;
- }
- }
- // Could create a Parametric Diagram on a Package, an intermediate Block will be created
- else if(selectedElement instanceof org.eclipse.uml2.uml.Package) {
- return true;
- }
- }
return false;
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java
index 7f1ebc23682..5b82c60ff3c 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/commands/CustomParametricContextLinkCreateCommand.java
@@ -90,7 +90,7 @@ public class CustomParametricContextLinkCreateCommand extends
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
- Namespace context = resolveTargetNamespace();
+ Namespace context = getTarget();
if(getSource() != null && context != null) {
getSource().setContext(context);
String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(Constraint.class.getSimpleName(), context.getOwnedRules(), getSource());
@@ -122,7 +122,7 @@ public class CustomParametricContextLinkCreateCommand extends
* Get the property Namespace in case of property typed by a Namespace
*/
@Override
- protected Namespace resolveTargetNamespace() {
+ protected Namespace getTarget() {
EObject targetNamespace;
if (target instanceof Property) {
targetNamespace = ((Property) target).getType();
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
index ec58e35a152..9628122599a 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
@@ -21,7 +21,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.sysml.diagram.common;bundle-version="1.0.0",
org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0"
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.sysml.diagram.requirement,
org.eclipse.papyrus.sysml.diagram.requirement.edit.part,
org.eclipse.papyrus.sysml.diagram.requirement.edit.policy,
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
index 55b7fabd29f..cb5f27e3ee9 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.xml
@@ -25,61 +25,8 @@
categoryId="org.eclipse.papyrus.editor.category"/>
</extension>
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.sysml.diagram.requirement.CreateRequirementDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
- icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
- style="push" tooltip="Create a new Requirement Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
- icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
- style="push" tooltip="Create a new Requirement Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
- icon="icons/obj16/Diagram_Requirement.gif"
- label="Create a new Requirement Diagram"
- style="push"
- tooltip="Create a new Requirement Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.sysml.diagram.common.IsPapyrusActiveWithSysML"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
<!-- Palette tool declaration (declares the real palette containment) -->
<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
index 29bf49818e6..7c486c47b57 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreateCommand.java
@@ -10,27 +10,27 @@
* Contributors:
* CEA LIST- Initial API and implementation
* Nizar GUEDIDI (CEA LIST)- modification
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.requirement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
import org.eclipse.papyrus.sysml.diagram.requirement.provider.ElementTypes;
-
-
+/**
+ * Represents the creation command for a SysML requirements diagram
+ * @author Laurent Wouters
+ */
public class RequirementDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
/**
* {@inheritDoc}
*/
@Override
protected String getDefaultDiagramName() {
- return "RequirementDiagram"; // //$NON-NLS-1$
+ return "New Requirements Diagram"; // //$NON-NLS-1$
}
/**
@@ -48,20 +48,4 @@ public class RequirementDiagramCreateCommand extends AbstractPapyrusGmfCreateDia
protected PreferencesHint getPreferenceHint() {
return Activator.DIAGRAM_PREFERENCES_HINT;
}
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
- // Start of user code Custom diagram creation
- Diagram diagram = null;
-
- if(owner instanceof org.eclipse.uml2.uml.Package) {
- diagram = super.createDiagram(diagramResource, owner, name);
- }
-
- return diagram;
- // End of user code
- }
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java
deleted file mode 100644
index a760aed319d..00000000000
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/CreateRequirementDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.requirement;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateRequirementDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateRequirementDiagramWithNavigationHandler() {
- super(new RequirementDiagramCreateCommand(), new RequirementDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java
index 030b35ba0fa..721426b721f 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramCreationCondition.java
@@ -9,13 +9,13 @@
*
* Contributors:
* Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Viewpoints application
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.requirement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.papyrus.sysml.util.SysmlResource;
/**
* RequirementDiagramCondition to set conditions for the diagram creation
@@ -26,14 +26,6 @@ public class RequirementDiagramCreationCondition extends PerspectiveContextDepen
* {@inheritDoc}
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- if(selectedElement instanceof org.eclipse.uml2.uml.Package) {
- org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package)selectedElement;
- if(pack.getAppliedProfile(SysmlResource.REQUIREMENTS_ID, true) != null) {
- return true;
- }
- }
- }
return false;
}
}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
index 9fd55c981be..2010786aa04 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
@@ -11,7 +11,8 @@
<extension
point="org.eclipse.papyrus.infra.nattable.configuration">
<configuration
- file="resources/allocation.nattableconfiguration">
+ file="resources/allocation.nattableconfiguration"
+ type="PapyrusSysMLAllocationTable">
</configuration>
</extension>
<extension
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
index 471e37f249f..d22991c9b73 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
@@ -40,58 +40,5 @@
</class>
</handler>
</extension>
- <extension
- id="create.table.menus"
- name="Create Table Menus"
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.infra.nattable.popupmenu.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.papyrus.infra.nattable.menu.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.papyrus.infra.nattable.toolbar.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
</plugin>
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml
index a5e6ee819dc..33051d7c1ad 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config/plugin.xml
@@ -4,7 +4,8 @@
<extension
point="org.eclipse.papyrus.infra.nattable.configuration">
<configuration
- file="configs/requirement.nattableconfiguration">
+ file="configs/requirement.nattableconfiguration"
+ type="PapyrusSysMLRequirementTable">
</configuration>
</extension>
<extension
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml
index 9415644fd62..19aa4a4f0ca 100644
--- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml
+++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement/plugin.xml
@@ -60,59 +60,6 @@
</handler>
</extension>
<extension
- id="create.table.menus"
- name="Create Table Menus"
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.infra.nattable.popupmenu.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.papyrus.infra.nattable.menu.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.papyrus.infra.nattable.toolbar.createnattable">
- <command
- commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
point="org.eclipse.ui.commandImages">
<image
commandId="org.eclipse.papyrus.sysml.nattable.requirement.create.command"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
index 8bd2f101951..b6855aeb0cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
@@ -83,13 +83,12 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.emf.ecore.edit;visibility:=reexport,
org.eclipse.emf.validation.ocl;visibility:=reexport,
org.eclipse.gef,
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0"
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.part.UMLDia
- gramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity;singleto
- n:=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/ActivityDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/ActivityDiagramCreationCondition.java
index 9ffc9dcf2a1..6f5b9e89a81 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/ActivityDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/ActivityDiagramCreationCondition.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.activity;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Activity;
/**
* ActivityDiagramCreationCondition class allows to check if an Activity diagram can be added to the
@@ -25,9 +24,6 @@ public class ActivityDiagramCreationCondition extends PerspectiveContextDependen
*/
@Override
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof Activity;
- }
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/CreateActivityDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/CreateActivityDiagramWithNavigationHandler.java
deleted file mode 100644
index cc3427c43bb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/CreateActivityDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateActivityDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateActivityDiagramWithNavigationHandler() {
- super(new CreateActivityDiagramCommand(), new ActivityDiagramCreationCondition());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
index 441a5628fbc..2667b9ce43a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/commands/CreateActionLocalConditionViewCommand.java
@@ -28,6 +28,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.activity.edit.commands.ConstraintAsLocalPostcondCreateCommand;
import org.eclipse.papyrus.uml.diagram.activity.edit.commands.ConstraintAsLocalPrecondCreateCommand;
import org.eclipse.papyrus.uml.diagram.activity.edit.commands.DurationConstraintAsLocalPostcondCreateCommand;
@@ -80,7 +81,7 @@ public class CreateActionLocalConditionViewCommand extends Command {
* the part of the action owning the condition
*/
public CreateActionLocalConditionViewCommand(IHintedType conditionType, ActivityActivityContentCompartmentEditPart graphicalParent, EObject containerAction, EditPart actionPart) {
- elementCreationCommand = getElementCreationCommand(containerAction, conditionType);
+ elementCreationCommand = getElementCreationCommand(containerAction, conditionType, graphicalParent);
compartment = graphicalParent;
linkedActionEditPart = actionPart;
type = conditionType;
@@ -96,31 +97,31 @@ public class CreateActionLocalConditionViewCommand extends Command {
* (Constraint_3011) or postcondition (Constraint_3012)
* @return the command to create model element or null
*/
- private static ICommandProxy getElementCreationCommand(EObject containerAction, IHintedType conditionType) {
+ private static ICommandProxy getElementCreationCommand(EObject containerAction, IHintedType conditionType, EditPart part) {
CreateElementRequest createElementReq = new CreateElementRequest(containerAction, conditionType);
if(UMLElementTypes.Constraint_3011.equals(conditionType)) {
- ConstraintAsLocalPrecondCreateCommand cmd = new ConstraintAsLocalPrecondCreateCommand(createElementReq);
+ ConstraintAsLocalPrecondCreateCommand cmd = new ConstraintAsLocalPrecondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.Constraint_3012.equals(conditionType)) {
- ConstraintAsLocalPostcondCreateCommand cmd = new ConstraintAsLocalPostcondCreateCommand(createElementReq);
+ ConstraintAsLocalPostcondCreateCommand cmd = new ConstraintAsLocalPostcondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.IntervalConstraint_3032.equals(conditionType)) {
- IntervalConstraintAsLocalPrecondCreateCommand cmd = new IntervalConstraintAsLocalPrecondCreateCommand(createElementReq);
+ IntervalConstraintAsLocalPrecondCreateCommand cmd = new IntervalConstraintAsLocalPrecondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.IntervalConstraint_3033.equals(conditionType)) {
- IntervalConstraintAsLocalPostcondCreateCommand cmd = new IntervalConstraintAsLocalPostcondCreateCommand(createElementReq);
+ IntervalConstraintAsLocalPostcondCreateCommand cmd = new IntervalConstraintAsLocalPostcondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.DurationConstraint_3034.equals(conditionType)) {
- DurationConstraintAsLocalPrecondCreateCommand cmd = new DurationConstraintAsLocalPrecondCreateCommand(createElementReq);
+ DurationConstraintAsLocalPrecondCreateCommand cmd = new DurationConstraintAsLocalPrecondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.DurationConstraint_3035.equals(conditionType)) {
- DurationConstraintAsLocalPostcondCreateCommand cmd = new DurationConstraintAsLocalPostcondCreateCommand(createElementReq);
+ DurationConstraintAsLocalPostcondCreateCommand cmd = new DurationConstraintAsLocalPostcondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.TimeConstraint_3036.equals(conditionType)) {
- TimeConstraintAsLocalPrecondCreateCommand cmd = new TimeConstraintAsLocalPrecondCreateCommand(createElementReq);
+ TimeConstraintAsLocalPrecondCreateCommand cmd = new TimeConstraintAsLocalPrecondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else if(UMLElementTypes.TimeConstraint_3037.equals(conditionType)) {
- TimeConstraintAsLocalPostcondCreateCommand cmd = new TimeConstraintAsLocalPostcondCreateCommand(createElementReq);
+ TimeConstraintAsLocalPostcondCreateCommand cmd = new TimeConstraintAsLocalPostcondCreateCommand(createElementReq, DiagramUtils.getDiagramFrom(part));
return new ICommandProxy(cmd);
} else {
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
index 7444de0a987..8ba1506e449 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/plugin.xml
@@ -45,64 +45,7 @@
</command>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.activity.CreateActivityDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.activity.CreateActivityDiagramCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </with>
- </activeWhen>
- </handler>
- </extension>
-<extension
- point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.activity.CreateActivityDiagramCommand"
- icon="icons/obj16/Diagram_Activity.gif"
- label="Create a new Activity Diagram"
- style="push"
- tooltip="Create a new Activity Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.activity.CreateActivityDiagramCommand"
- icon="icons/obj16/Diagram_Activity.gif"
- label="Create a new Activity Diagram"
- style="push"
- tooltip="Create a new Activity Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.activity.CreateActivityDiagramCommand"
- icon="icons/obj16/Diagram_Activity.gif"
- label="Create a new Activity Diagram"
- style="push"
- tooltip="Create a new Activity Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
<extension
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AcceptEventActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AcceptEventActionCreateCommand.java
index 63788f77715..dc452b749ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AcceptEventActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AcceptEventActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.AcceptEventAction;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class AcceptEventActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class AcceptEventActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AcceptEventActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AcceptEventActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AcceptEventActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AcceptEventActionCreateCommand(req, eObject);
+ public static AcceptEventActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AcceptEventActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AcceptEventActionCreateCommand(CreateElementRequest req) {
+ public AcceptEventActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class AcceptEventActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAcceptEventAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class AcceptEventActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
AcceptEventAction newElement = UMLFactory.eINSTANCE.createAcceptEventAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_AcceptEventAction_3063(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallBeActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallBeActCreateCommand.java
index ff64369aa0a..dceda611fd5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallBeActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallBeActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActionInputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInCallBeActCreateCommand(req, eObject);
+ public static ActionInputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInCallBeActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInCallBeActCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInCallBeActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActionInputPinInCallBeActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActionInputPinInCallBeActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActAsTargetCreateCommand.java
index d2a332bc970..75b02b5675d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.CallOperationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInCallOpActAsTargetCreateCommand extends EditElementC
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInCallOpActAsTargetCreateCommand extends EditElementC
/**
* @generated
*/
- public ActionInputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInCallOpActAsTargetCreateCommand(req, eObject);
+ public static ActionInputPinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInCallOpActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ActionInputPinInCallOpActAsTargetCreateCommand extends EditElementC
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ActionInputPinInCallOpActAsTargetCreateCommand extends EditElementC
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- CallOperationAction owner = (CallOperationAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CallOperationAction qualifiedTarget = (CallOperationAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3026(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActCreateCommand.java
index 1ead694f330..e0fa9770cb9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInCallOpActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActionInputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInCallOpActCreateCommand(req, eObject);
+ public static ActionInputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInCallOpActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInCallOpActCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInCallOpActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActionInputPinInCallOpActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActionInputPinInCallOpActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3021(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInOpaqueActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInOpaqueActCreateCommand.java
index ff438910ea6..7be3a13d66e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInOpaqueActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInOpaqueActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActionInputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInOpaqueActCreateCommand(req, eObject);
+ public static ActionInputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInOpaqueActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInOpaqueActCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInOpaqueActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActionInputPinInOpaqueActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActionInputPinInOpaqueActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- OpaqueAction owner = (OpaqueAction)getElementToEdit();
- owner.getInputValues().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ OpaqueAction qualifiedTarget = (OpaqueAction)target;
+ qualifiedTarget.getInputValues().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3016(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsReqCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsReqCreateCommand.java
index e8254f5d11c..0e7aae7a49d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsReqCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsReqCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInSendObjActAsReqCreateCommand extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInSendObjActAsReqCreateCommand extends EditElementCom
/**
* @generated
*/
- public ActionInputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInSendObjActAsReqCreateCommand(req, eObject);
+ public static ActionInputPinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInSendObjActAsReqCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInSendObjActAsReqCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ActionInputPinInSendObjActAsReqCreateCommand extends EditElementCom
if(container.getRequest() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ActionInputPinInSendObjActAsReqCreateCommand extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setRequest(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setRequest(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3047(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsTargetCreateCommand.java
index bb04ca36ca3..3cea593cc76 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendObjActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInSendObjActAsTargetCreateCommand extends EditElement
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInSendObjActAsTargetCreateCommand extends EditElement
/**
* @generated
*/
- public ActionInputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInSendObjActAsTargetCreateCommand(req, eObject);
+ public static ActionInputPinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInSendObjActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ActionInputPinInSendObjActAsTargetCreateCommand extends EditElement
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ActionInputPinInSendObjActAsTargetCreateCommand extends EditElement
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3050(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActAsTargetCreateCommand.java
index a1bd991b101..a3aa1ff5650 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.SendSignalAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInSendSigActAsTargetCreateCommand extends EditElement
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInSendSigActAsTargetCreateCommand extends EditElement
/**
* @generated
*/
- public ActionInputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInSendSigActAsTargetCreateCommand(req, eObject);
+ public static ActionInputPinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInSendSigActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ActionInputPinInSendSigActAsTargetCreateCommand extends EditElement
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ActionInputPinInSendSigActAsTargetCreateCommand extends EditElement
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- SendSignalAction owner = (SendSignalAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendSignalAction qualifiedTarget = (SendSignalAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3061(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActCreateCommand.java
index 195c8c78e9e..2a23ece1f5e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActionInputPinInSendSigActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ActionInputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActionInputPinInSendSigActCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActionInputPinInSendSigActCreateCommand extends EditElementCommand
/**
* @generated
*/
- public ActionInputPinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionInputPinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionInputPinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionInputPinInSendSigActCreateCommand(req, eObject);
+ public static ActionInputPinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionInputPinInSendSigActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionInputPinInSendSigActCreateCommand(CreateElementRequest req) {
+ public ActionInputPinInSendSigActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActionInputPinInSendSigActCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActionInputPinInSendSigActCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionInputPin newElement = UMLFactory.eINSTANCE.createActionInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActionInputPin_3053(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommand.java
index f22a0dda4c1..4912e626886 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActivityCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActivityCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActivityCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActivityCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActivityCreateCommand(req, eObject);
+ public static ActivityCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityCreateCommand(CreateElementRequest req) {
+ public ActivityCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActivityCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActivityCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Activity newElement = UMLFactory.eINSTANCE.createActivity();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Activity_2001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommandCN.java
index 79faebdba4f..ce5e980af71 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityCreateCommandCN.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.BehavioredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActivityCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActivityCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ActivityCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ActivityCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ActivityCreateCommandCN(req, eObject);
+ public static ActivityCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityCreateCommandCN(CreateElementRequest req) {
+ public ActivityCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActivityCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActivityCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Activity newElement = UMLFactory.eINSTANCE.createActivity();
- BehavioredClassifier owner = (BehavioredClassifier)getElementToEdit();
- owner.getOwnedBehaviors().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ BehavioredClassifier qualifiedTarget = (BehavioredClassifier)target;
+ qualifiedTarget.getOwnedBehaviors().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Activity_3083(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityFinalNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityFinalNodeCreateCommand.java
index b22505dcbc1..9b940a7670d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityFinalNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityFinalNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ActivityFinalNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActivityFinalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActivityFinalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActivityFinalNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActivityFinalNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityFinalNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActivityFinalNodeCreateCommand(req, eObject);
+ public static ActivityFinalNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityFinalNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityFinalNodeCreateCommand(CreateElementRequest req) {
+ public ActivityFinalNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActivityFinalNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivityFinalNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActivityFinalNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActivityFinalNode newElement = UMLFactory.eINSTANCE.createActivityFinalNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActivityFinalNode_3005(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityParameterNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityParameterNodeCreateCommand.java
index 259b304d8ea..3bef7762b1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityParameterNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityParameterNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ActivityParameterNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActivityParameterNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActivityParameterNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActivityParameterNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActivityParameterNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityParameterNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActivityParameterNodeCreateCommand(req, eObject);
+ public static ActivityParameterNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityParameterNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityParameterNodeCreateCommand(CreateElementRequest req) {
+ public ActivityParameterNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActivityParameterNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivityParameterNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActivityParameterNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActivityParameterNode newElement = UMLFactory.eINSTANCE.createActivityParameterNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActivityParameterNode_3059(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityPartitionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityPartitionCreateCommand.java
index c0590f87957..255994f7c10 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityPartitionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ActivityPartitionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ActivityPartition;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ActivityPartitionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ActivityPartitionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActivityPartitionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActivityPartitionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityPartitionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActivityPartitionCreateCommand(req, eObject);
+ public static ActivityPartitionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityPartitionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityPartitionCreateCommand(CreateElementRequest req) {
+ public ActivityPartitionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ActivityPartitionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivityPartition());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ActivityPartitionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActivityPartition newElement = UMLFactory.eINSTANCE.createActivityPartition();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ActivityPartition_3067(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddStructuralFeatureValueActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddStructuralFeatureValueActionCreateCommand.java
index c3e271556e0..e86f0fd2580 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddStructuralFeatureValueActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddStructuralFeatureValueActionCreateCommand.java
@@ -11,11 +11,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.AddStructuralFeatureValueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,7 +30,7 @@ public class AddStructuralFeatureValueActionCreateCommand extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -35,24 +40,25 @@ public class AddStructuralFeatureValueActionCreateCommand extends EditElementCom
/**
* @generated
*/
- public AddStructuralFeatureValueActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AddStructuralFeatureValueActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AddStructuralFeatureValueActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AddStructuralFeatureValueActionCreateCommand(req, eObject);
+ public static AddStructuralFeatureValueActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AddStructuralFeatureValueActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AddStructuralFeatureValueActionCreateCommand(CreateElementRequest req) {
+ public AddStructuralFeatureValueActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -75,7 +81,9 @@ public class AddStructuralFeatureValueActionCreateCommand extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAddStructuralFeatureValueAction());
+ return data.isPermitted();
}
/**
@@ -83,8 +91,19 @@ public class AddStructuralFeatureValueActionCreateCommand extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
AddStructuralFeatureValueAction newElement = UMLFactory.eINSTANCE.createAddStructuralFeatureValueAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_AddStructuralFeatureValueAction_3091(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddVariableValueActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddVariableValueActionCreateCommand.java
index ec2de737e07..6e266e2913e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddVariableValueActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/AddVariableValueActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.AddVariableValueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class AddVariableValueActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class AddVariableValueActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AddVariableValueActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AddVariableValueActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AddVariableValueActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AddVariableValueActionCreateCommand(req, eObject);
+ public static AddVariableValueActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AddVariableValueActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AddVariableValueActionCreateCommand(CreateElementRequest req) {
+ public AddVariableValueActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class AddVariableValueActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAddVariableValueAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class AddVariableValueActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
AddVariableValueAction newElement = UMLFactory.eINSTANCE.createAddVariableValueAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_AddVariableValueAction_3099(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/BroadcastSignalActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/BroadcastSignalActionCreateCommand.java
index c3a6011a126..5e8da048e88 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/BroadcastSignalActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/BroadcastSignalActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.BroadcastSignalAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class BroadcastSignalActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class BroadcastSignalActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public BroadcastSignalActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public BroadcastSignalActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static BroadcastSignalActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new BroadcastSignalActionCreateCommand(req, eObject);
+ public static BroadcastSignalActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new BroadcastSignalActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public BroadcastSignalActionCreateCommand(CreateElementRequest req) {
+ public BroadcastSignalActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class BroadcastSignalActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBroadcastSignalAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class BroadcastSignalActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
BroadcastSignalAction newElement = UMLFactory.eINSTANCE.createBroadcastSignalAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_BroadcastSignalAction_3102(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CallOperationActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CallOperationActionCreateCommand.java
index 0ad92ab5d9e..6215dd3c5e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CallOperationActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CallOperationActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.CallOperationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class CallOperationActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class CallOperationActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CallOperationActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CallOperationActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CallOperationActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CallOperationActionCreateCommand(req, eObject);
+ public static CallOperationActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CallOperationActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CallOperationActionCreateCommand(CreateElementRequest req) {
+ public CallOperationActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class CallOperationActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCallOperationAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class CallOperationActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CallOperationAction newElement = UMLFactory.eINSTANCE.createCallOperationAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CallOperationAction_3010(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CentralBufferNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CentralBufferNodeCreateCommand.java
index 739725a6ad1..f97a2e52944 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CentralBufferNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CentralBufferNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.CentralBufferNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class CentralBufferNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class CentralBufferNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CentralBufferNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CentralBufferNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CentralBufferNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CentralBufferNodeCreateCommand(req, eObject);
+ public static CentralBufferNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CentralBufferNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CentralBufferNodeCreateCommand(CreateElementRequest req) {
+ public CentralBufferNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class CentralBufferNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCentralBufferNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class CentralBufferNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CentralBufferNode newElement = UMLFactory.eINSTANCE.createCentralBufferNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CentralBufferNode_3104(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CommentCreateCommand.java
index 3435ae284f0..57f3863b0f5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CommentCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3080(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConditionalNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConditionalNodeCreateCommand.java
index 65ec9a06626..17a981d475c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConditionalNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConditionalNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ConditionalNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ConditionalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ConditionalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConditionalNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConditionalNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConditionalNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConditionalNodeCreateCommand(req, eObject);
+ public static ConditionalNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConditionalNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConditionalNodeCreateCommand(CreateElementRequest req) {
+ public ConditionalNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ConditionalNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConditionalNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ConditionalNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ConditionalNode newElement = UMLFactory.eINSTANCE.createConditionalNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ConditionalNode_3069(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPostcondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPostcondCreateCommand.java
index 7bde58b96a5..f3ec62d8582 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPostcondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPostcondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ConstraintAsLocalPostcondCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ConstraintAsLocalPostcondCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintAsLocalPostcondCreateCommand(req, eObject);
+ public static ConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintAsLocalPostcondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintAsLocalPostcondCreateCommand(CreateElementRequest req) {
+ public ConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ConstraintAsLocalPostcondCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ConstraintAsLocalPostcondCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPostconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPostconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPrecondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPrecondCreateCommand.java
index cb1925d128d..34112d72e75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPrecondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintAsLocalPrecondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ConstraintAsLocalPrecondCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ConstraintAsLocalPrecondCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintAsLocalPrecondCreateCommand(req, eObject);
+ public static ConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintAsLocalPrecondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintAsLocalPrecondCreateCommand(CreateElementRequest req) {
+ public ConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ConstraintAsLocalPrecondCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ConstraintAsLocalPrecondCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPreconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPreconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3011(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintCreateCommandCN.java
index 8b1b059c263..51e08cc831c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintCreateCommandCN.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3112(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPostcondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPostcondCreateCommand.java
index fd3064c66e6..8c485abafcb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPostcondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPostcondCreateCommand.java
@@ -25,12 +25,17 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -40,7 +45,7 @@ public class ConstraintInActivityAsPostcondCreateCommand extends EditElementComm
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -50,24 +55,25 @@ public class ConstraintInActivityAsPostcondCreateCommand extends EditElementComm
/**
* @generated
*/
- public ConstraintInActivityAsPostcondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintInActivityAsPostcondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintInActivityAsPostcondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintInActivityAsPostcondCreateCommand(req, eObject);
+ public static ConstraintInActivityAsPostcondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintInActivityAsPostcondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintInActivityAsPostcondCreateCommand(CreateElementRequest req) {
+ public ConstraintInActivityAsPostcondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +96,9 @@ public class ConstraintInActivityAsPostcondCreateCommand extends EditElementComm
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -98,8 +106,19 @@ public class ConstraintInActivityAsPostcondCreateCommand extends EditElementComm
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Behavior childHolder = (Behavior)getElementToEdit();
childHolder.getPostconditions().add(newElement);
ElementInitializers.getInstance().init_Constraint_3003(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPrecondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPrecondCreateCommand.java
index 7be74dd391a..818d64cd7fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPrecondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ConstraintInActivityAsPrecondCreateCommand.java
@@ -25,12 +25,17 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -40,7 +45,7 @@ public class ConstraintInActivityAsPrecondCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -50,24 +55,25 @@ public class ConstraintInActivityAsPrecondCreateCommand extends EditElementComma
/**
* @generated
*/
- public ConstraintInActivityAsPrecondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintInActivityAsPrecondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintInActivityAsPrecondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintInActivityAsPrecondCreateCommand(req, eObject);
+ public static ConstraintInActivityAsPrecondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintInActivityAsPrecondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintInActivityAsPrecondCreateCommand(CreateElementRequest req) {
+ public ConstraintInActivityAsPrecondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +96,9 @@ public class ConstraintInActivityAsPrecondCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -98,8 +106,19 @@ public class ConstraintInActivityAsPrecondCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Behavior childHolder = (Behavior)getElementToEdit();
childHolder.getPreconditions().add(newElement);
ElementInitializers.getInstance().init_Constraint_3002(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CreateObjectActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CreateObjectActionCreateCommand.java
index ba8c7796e18..7d11238d7bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CreateObjectActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/CreateObjectActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.CreateObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class CreateObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class CreateObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CreateObjectActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CreateObjectActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CreateObjectActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CreateObjectActionCreateCommand(req, eObject);
+ public static CreateObjectActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CreateObjectActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CreateObjectActionCreateCommand(CreateElementRequest req) {
+ public CreateObjectActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class CreateObjectActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCreateObjectAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class CreateObjectActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CreateObjectAction newElement = UMLFactory.eINSTANCE.createCreateObjectAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CreateObjectAction_3086(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DataStoreNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DataStoreNodeCreateCommand.java
index 1a0fa4840ac..2fa16531d32 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DataStoreNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DataStoreNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.DataStoreNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class DataStoreNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class DataStoreNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataStoreNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataStoreNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataStoreNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataStoreNodeCreateCommand(req, eObject);
+ public static DataStoreNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataStoreNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataStoreNodeCreateCommand(CreateElementRequest req) {
+ public DataStoreNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class DataStoreNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataStoreNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class DataStoreNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataStoreNode newElement = UMLFactory.eINSTANCE.createDataStoreNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataStoreNode_3078(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DecisionNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DecisionNodeCreateCommand.java
index 5e3af3cfc13..c95dd062b1f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DecisionNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DecisionNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.DecisionNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class DecisionNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class DecisionNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DecisionNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DecisionNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DecisionNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DecisionNodeCreateCommand(req, eObject);
+ public static DecisionNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DecisionNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DecisionNodeCreateCommand(CreateElementRequest req) {
+ public DecisionNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class DecisionNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDecisionNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class DecisionNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DecisionNode newElement = UMLFactory.eINSTANCE.createDecisionNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DecisionNode_3038(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DestroyObjectActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DestroyObjectActionCreateCommand.java
index 7ff0a959aa0..c888129e2f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DestroyObjectActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DestroyObjectActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.DestroyObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class DestroyObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class DestroyObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DestroyObjectActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DestroyObjectActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DestroyObjectActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DestroyObjectActionCreateCommand(req, eObject);
+ public static DestroyObjectActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DestroyObjectActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DestroyObjectActionCreateCommand(CreateElementRequest req) {
+ public DestroyObjectActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class DestroyObjectActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestroyObjectAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class DestroyObjectActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DestroyObjectAction newElement = UMLFactory.eINSTANCE.createDestroyObjectAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DestroyObjectAction_3095(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPostcondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPostcondCreateCommand.java
index 9bb29c0ffe2..e3350d39d09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPostcondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPostcondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class DurationConstraintAsLocalPostcondCreateCommand extends EditElementC
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class DurationConstraintAsLocalPostcondCreateCommand extends EditElementC
/**
* @generated
*/
- public DurationConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintAsLocalPostcondCreateCommand(req, eObject);
+ public static DurationConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintAsLocalPostcondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintAsLocalPostcondCreateCommand(CreateElementRequest req) {
+ public DurationConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class DurationConstraintAsLocalPostcondCreateCommand extends EditElementC
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class DurationConstraintAsLocalPostcondCreateCommand extends EditElementC
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPostconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPostconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_3035(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPrecondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPrecondCreateCommand.java
index 61eac6466d9..0001ce59d88 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPrecondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/DurationConstraintAsLocalPrecondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class DurationConstraintAsLocalPrecondCreateCommand extends EditElementCo
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class DurationConstraintAsLocalPrecondCreateCommand extends EditElementCo
/**
* @generated
*/
- public DurationConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintAsLocalPrecondCreateCommand(req, eObject);
+ public static DurationConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintAsLocalPrecondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintAsLocalPrecondCreateCommand(CreateElementRequest req) {
+ public DurationConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class DurationConstraintAsLocalPrecondCreateCommand extends EditElementCo
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class DurationConstraintAsLocalPrecondCreateCommand extends EditElementCo
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPreconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPreconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_3034(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsInCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsInCreateCommand.java
index c812ce8681f..bdf30c0e2bf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsInCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsInCreateCommand.java
@@ -25,12 +25,17 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ExpansionNode;
import org.eclipse.uml2.uml.ExpansionRegion;
import org.eclipse.uml2.uml.StructuredActivityNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -40,7 +45,7 @@ public class ExpansionNodeAsInCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -50,24 +55,25 @@ public class ExpansionNodeAsInCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExpansionNodeAsInCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExpansionNodeAsInCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExpansionNodeAsInCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExpansionNodeAsInCreateCommand(req, eObject);
+ public static ExpansionNodeAsInCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExpansionNodeAsInCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExpansionNodeAsInCreateCommand(CreateElementRequest req) {
+ public ExpansionNodeAsInCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +96,9 @@ public class ExpansionNodeAsInCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExpansionNode());
+ return data.isPermitted();
}
/**
@@ -98,8 +106,19 @@ public class ExpansionNodeAsInCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExpansionNode newElement = UMLFactory.eINSTANCE.createExpansionNode();
- StructuredActivityNode owner = (StructuredActivityNode)getElementToEdit();
- owner.getNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredActivityNode qualifiedTarget = (StructuredActivityNode)target;
+ qualifiedTarget.getNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ExpansionRegion childHolder = (ExpansionRegion)getElementToEdit();
childHolder.getInputElements().add(newElement);
ElementInitializers.getInstance().init_ExpansionNode_3074(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsOutCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsOutCreateCommand.java
index dce544c560d..0f15d7dcf11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsOutCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionNodeAsOutCreateCommand.java
@@ -25,12 +25,17 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.ExpansionNode;
import org.eclipse.uml2.uml.ExpansionRegion;
import org.eclipse.uml2.uml.StructuredActivityNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -40,7 +45,7 @@ public class ExpansionNodeAsOutCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -50,24 +55,25 @@ public class ExpansionNodeAsOutCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExpansionNodeAsOutCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExpansionNodeAsOutCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExpansionNodeAsOutCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExpansionNodeAsOutCreateCommand(req, eObject);
+ public static ExpansionNodeAsOutCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExpansionNodeAsOutCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExpansionNodeAsOutCreateCommand(CreateElementRequest req) {
+ public ExpansionNodeAsOutCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +96,9 @@ public class ExpansionNodeAsOutCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExpansionNode());
+ return data.isPermitted();
}
/**
@@ -98,8 +106,19 @@ public class ExpansionNodeAsOutCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExpansionNode newElement = UMLFactory.eINSTANCE.createExpansionNode();
- StructuredActivityNode owner = (StructuredActivityNode)getElementToEdit();
- owner.getNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredActivityNode qualifiedTarget = (StructuredActivityNode)target;
+ qualifiedTarget.getNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ExpansionRegion childHolder = (ExpansionRegion)getElementToEdit();
childHolder.getOutputElements().add(newElement);
ElementInitializers.getInstance().init_ExpansionNode_3075(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionRegionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionRegionCreateCommand.java
index 0e1ba9d4e80..be0f68f26d9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionRegionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ExpansionRegionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ExpansionRegion;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ExpansionRegionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ExpansionRegionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExpansionRegionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExpansionRegionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExpansionRegionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExpansionRegionCreateCommand(req, eObject);
+ public static ExpansionRegionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExpansionRegionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExpansionRegionCreateCommand(CreateElementRequest req) {
+ public ExpansionRegionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ExpansionRegionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExpansionRegion());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ExpansionRegionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExpansionRegion newElement = UMLFactory.eINSTANCE.createExpansionRegion();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExpansionRegion_3070(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/FlowFinalNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/FlowFinalNodeCreateCommand.java
index bd4c0b37d49..114ff379e3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/FlowFinalNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/FlowFinalNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.FlowFinalNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class FlowFinalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class FlowFinalNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public FlowFinalNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public FlowFinalNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FlowFinalNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new FlowFinalNodeCreateCommand(req, eObject);
+ public static FlowFinalNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FlowFinalNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public FlowFinalNodeCreateCommand(CreateElementRequest req) {
+ public FlowFinalNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class FlowFinalNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFlowFinalNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class FlowFinalNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
FlowFinalNode newElement = UMLFactory.eINSTANCE.createFlowFinalNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_FlowFinalNode_3006(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ForkNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ForkNodeCreateCommand.java
index efd08bce041..a89fc618d27 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ForkNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ForkNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ForkNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ForkNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ForkNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ForkNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ForkNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ForkNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ForkNodeCreateCommand(req, eObject);
+ public static ForkNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ForkNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ForkNodeCreateCommand(CreateElementRequest req) {
+ public ForkNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ForkNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getForkNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ForkNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ForkNode newElement = UMLFactory.eINSTANCE.createForkNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ForkNode_3040(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InitialNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InitialNodeCreateCommand.java
index 2e82781f271..c470e24b54e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InitialNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InitialNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.InitialNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InitialNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InitialNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InitialNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InitialNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InitialNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InitialNodeCreateCommand(req, eObject);
+ public static InitialNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InitialNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InitialNodeCreateCommand(CreateElementRequest req) {
+ public InitialNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InitialNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInitialNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InitialNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InitialNode newElement = UMLFactory.eINSTANCE.createInitialNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InitialNode_3004(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand.java
index c91e0f5de03..e2a04a5a692 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.StructuralFeatureAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand exte
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand exte
/**
* @generated
*/
- public InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(req, eObject);
+ public static InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(CreateElementRequest req) {
+ public InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand exte
if(container.getObject() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInAddStructuralFeatureValueActionAsObjectCreateCommand exte
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- StructuralFeatureAction owner = (StructuralFeatureAction)getElementToEdit();
- owner.setObject(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuralFeatureAction qualifiedTarget = (StructuralFeatureAction)target;
+ qualifiedTarget.setObject(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3092(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsValueCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsValueCreateCommand.java
index 47b6808cadc..768c7741611 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsValueCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddStructuralFeatureValueActionAsValueCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.WriteStructuralFeatureAction;
/**
@@ -39,7 +44,7 @@ public class InputPinInAddStructuralFeatureValueActionAsValueCreateCommand exten
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInAddStructuralFeatureValueActionAsValueCreateCommand exten
/**
* @generated
*/
- public InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInAddStructuralFeatureValueActionAsValueCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(req, eObject);
+ public static InputPinInAddStructuralFeatureValueActionAsValueCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(CreateElementRequest req) {
+ public InputPinInAddStructuralFeatureValueActionAsValueCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInAddStructuralFeatureValueActionAsValueCreateCommand exten
if(container.getValue() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInAddStructuralFeatureValueActionAsValueCreateCommand exten
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- WriteStructuralFeatureAction owner = (WriteStructuralFeatureAction)getElementToEdit();
- owner.setValue(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ WriteStructuralFeatureAction qualifiedTarget = (WriteStructuralFeatureAction)target;
+ qualifiedTarget.setValue(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3093(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsInsertAtCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsInsertAtCreateCommand.java
index ccce43cf13f..32389719fc4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsInsertAtCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsInsertAtCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.AddVariableValueAction;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInAddVariableValueActionAsInsertAtCreateCommand extends Edi
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInAddVariableValueActionAsInsertAtCreateCommand extends Edi
/**
* @generated
*/
- public InputPinInAddVariableValueActionAsInsertAtCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInAddVariableValueActionAsInsertAtCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInAddVariableValueActionAsInsertAtCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInAddVariableValueActionAsInsertAtCreateCommand(req, eObject);
+ public static InputPinInAddVariableValueActionAsInsertAtCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInAddVariableValueActionAsInsertAtCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInAddVariableValueActionAsInsertAtCreateCommand(CreateElementRequest req) {
+ public InputPinInAddVariableValueActionAsInsertAtCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInAddVariableValueActionAsInsertAtCreateCommand extends Edi
if(container.getInsertAt() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInAddVariableValueActionAsInsertAtCreateCommand extends Edi
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- AddVariableValueAction owner = (AddVariableValueAction)getElementToEdit();
- owner.setInsertAt(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ AddVariableValueAction qualifiedTarget = (AddVariableValueAction)target;
+ qualifiedTarget.setInsertAt(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3100(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsValueCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsValueCreateCommand.java
index 6d7607a22bf..8f4e2dbbcf3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsValueCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInAddVariableValueActionAsValueCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.WriteVariableAction;
/**
@@ -39,7 +44,7 @@ public class InputPinInAddVariableValueActionAsValueCreateCommand extends EditEl
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInAddVariableValueActionAsValueCreateCommand extends EditEl
/**
* @generated
*/
- public InputPinInAddVariableValueActionAsValueCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInAddVariableValueActionAsValueCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInAddVariableValueActionAsValueCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInAddVariableValueActionAsValueCreateCommand(req, eObject);
+ public static InputPinInAddVariableValueActionAsValueCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInAddVariableValueActionAsValueCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInAddVariableValueActionAsValueCreateCommand(CreateElementRequest req) {
+ public InputPinInAddVariableValueActionAsValueCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInAddVariableValueActionAsValueCreateCommand extends EditEl
if(container.getValue() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInAddVariableValueActionAsValueCreateCommand extends EditEl
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- WriteVariableAction owner = (WriteVariableAction)getElementToEdit();
- owner.setValue(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ WriteVariableAction qualifiedTarget = (WriteVariableAction)target;
+ qualifiedTarget.setValue(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3101(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInBroadcastSignalActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInBroadcastSignalActionCreateCommand.java
index 04074d17294..eb9683836be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInBroadcastSignalActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInBroadcastSignalActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInBroadcastSignalActionCreateCommand extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInBroadcastSignalActionCreateCommand extends EditElementCom
/**
* @generated
*/
- public InputPinInBroadcastSignalActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInBroadcastSignalActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInBroadcastSignalActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInBroadcastSignalActionCreateCommand(req, eObject);
+ public static InputPinInBroadcastSignalActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInBroadcastSignalActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInBroadcastSignalActionCreateCommand(CreateElementRequest req) {
+ public InputPinInBroadcastSignalActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInBroadcastSignalActionCreateCommand extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInBroadcastSignalActionCreateCommand extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3103(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallBeActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallBeActCreateCommand.java
index ccaf07e5ff8..b90d7aa5235 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallBeActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallBeActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInCallBeActCreateCommand(req, eObject);
+ public static InputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInCallBeActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInCallBeActCreateCommand(CreateElementRequest req) {
+ public InputPinInCallBeActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInCallBeActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInCallBeActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3019(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActAsTargetCreateCommand.java
index 24bfd0b65c9..eed260b1b22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.CallOperationAction;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInCallOpActAsTargetCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInCallOpActAsTargetCreateCommand extends EditElementCommand
/**
* @generated
*/
- public InputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInCallOpActAsTargetCreateCommand(req, eObject);
+ public static InputPinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInCallOpActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req) {
+ public InputPinInCallOpActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInCallOpActAsTargetCreateCommand extends EditElementCommand
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInCallOpActAsTargetCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- CallOperationAction owner = (CallOperationAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CallOperationAction qualifiedTarget = (CallOperationAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3027(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActCreateCommand.java
index bf1adf9094e..54d8c830263 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInCallOpActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInCallOpActCreateCommand(req, eObject);
+ public static InputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInCallOpActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInCallOpActCreateCommand(CreateElementRequest req) {
+ public InputPinInCallOpActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInCallOpActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInCallOpActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3023(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInDestroyObjectActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInDestroyObjectActionCreateCommand.java
index a813b2427b6..37ddda7d456 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInDestroyObjectActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInDestroyObjectActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.DestroyObjectAction;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInDestroyObjectActionCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInDestroyObjectActionCreateCommand extends EditElementComma
/**
* @generated
*/
- public InputPinInDestroyObjectActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInDestroyObjectActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInDestroyObjectActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInDestroyObjectActionCreateCommand(req, eObject);
+ public static InputPinInDestroyObjectActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInDestroyObjectActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInDestroyObjectActionCreateCommand(CreateElementRequest req) {
+ public InputPinInDestroyObjectActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInDestroyObjectActionCreateCommand extends EditElementComma
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInDestroyObjectActionCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- DestroyObjectAction owner = (DestroyObjectAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DestroyObjectAction qualifiedTarget = (DestroyObjectAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3096(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInLoopNodeAsVariableCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInLoopNodeAsVariableCreateCommand.java
index 66e21c87e34..f775f727d9f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInLoopNodeAsVariableCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInLoopNodeAsVariableCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.LoopNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInLoopNodeAsVariableCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInLoopNodeAsVariableCreateCommand extends EditElementComman
/**
* @generated
*/
- public InputPinInLoopNodeAsVariableCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInLoopNodeAsVariableCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInLoopNodeAsVariableCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInLoopNodeAsVariableCreateCommand(req, eObject);
+ public static InputPinInLoopNodeAsVariableCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInLoopNodeAsVariableCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInLoopNodeAsVariableCreateCommand(CreateElementRequest req) {
+ public InputPinInLoopNodeAsVariableCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInLoopNodeAsVariableCreateCommand extends EditElementComman
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInLoopNodeAsVariableCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- LoopNode owner = (LoopNode)getElementToEdit();
- owner.getLoopVariableInputs().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ LoopNode qualifiedTarget = (LoopNode)target;
+ qualifiedTarget.getLoopVariableInputs().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3105(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInOpaqueActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInOpaqueActCreateCommand.java
index 255f85ccda9..5749809093e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInOpaqueActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInOpaqueActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInOpaqueActCreateCommand(req, eObject);
+ public static InputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInOpaqueActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInOpaqueActCreateCommand(CreateElementRequest req) {
+ public InputPinInOpaqueActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInOpaqueActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInOpaqueActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- OpaqueAction owner = (OpaqueAction)getElementToEdit();
- owner.getInputValues().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ OpaqueAction qualifiedTarget = (OpaqueAction)target;
+ qualifiedTarget.getInputValues().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3013(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInReadStructuralFeatureAsObjectCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInReadStructuralFeatureAsObjectCreateCommand.java
index e1f473bb5d1..93f430d383a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInReadStructuralFeatureAsObjectCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInReadStructuralFeatureAsObjectCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.StructuralFeatureAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInReadStructuralFeatureAsObjectCreateCommand extends EditEl
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInReadStructuralFeatureAsObjectCreateCommand extends EditEl
/**
* @generated
*/
- public InputPinInReadStructuralFeatureAsObjectCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInReadStructuralFeatureAsObjectCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInReadStructuralFeatureAsObjectCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInReadStructuralFeatureAsObjectCreateCommand(req, eObject);
+ public static InputPinInReadStructuralFeatureAsObjectCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInReadStructuralFeatureAsObjectCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInReadStructuralFeatureAsObjectCreateCommand(CreateElementRequest req) {
+ public InputPinInReadStructuralFeatureAsObjectCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInReadStructuralFeatureAsObjectCreateCommand extends EditEl
if(container.getObject() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInReadStructuralFeatureAsObjectCreateCommand extends EditEl
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- StructuralFeatureAction owner = (StructuralFeatureAction)getElementToEdit();
- owner.setObject(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuralFeatureAction qualifiedTarget = (StructuralFeatureAction)target;
+ qualifiedTarget.setObject(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3089(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsReqCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsReqCreateCommand.java
index 1c8ee1e77e9..ebed06aac6a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsReqCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsReqCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInSendObjActAsReqCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInSendObjActAsReqCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInSendObjActAsReqCreateCommand(req, eObject);
+ public static InputPinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInSendObjActAsReqCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInSendObjActAsReqCreateCommand(CreateElementRequest req) {
+ public InputPinInSendObjActAsReqCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInSendObjActAsReqCreateCommand extends EditElementCommand {
if(container.getRequest() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInSendObjActAsReqCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setRequest(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setRequest(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3048(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsTargetCreateCommand.java
index 3a162a66bfa..2ae59ebe396 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendObjActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInSendObjActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInSendObjActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- public InputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInSendObjActAsTargetCreateCommand(req, eObject);
+ public static InputPinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInSendObjActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req) {
+ public InputPinInSendObjActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInSendObjActAsTargetCreateCommand extends EditElementComman
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInSendObjActAsTargetCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3051(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActAsTargetCreateCommand.java
index 0031ba8978a..963e584f42b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActAsTargetCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.SendSignalAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInSendSigActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInSendSigActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- public InputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInSendSigActAsTargetCreateCommand(req, eObject);
+ public static InputPinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInSendSigActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req) {
+ public InputPinInSendSigActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class InputPinInSendSigActAsTargetCreateCommand extends EditElementComman
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class InputPinInSendSigActAsTargetCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- SendSignalAction owner = (SendSignalAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendSignalAction qualifiedTarget = (SendSignalAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3062(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActCreateCommand.java
index 93b4f7a36a8..447b92f7b64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InputPinInSendSigActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InputPin;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class InputPinInSendSigActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class InputPinInSendSigActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InputPinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InputPinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InputPinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InputPinInSendSigActCreateCommand(req, eObject);
+ public static InputPinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InputPinInSendSigActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InputPinInSendSigActCreateCommand(CreateElementRequest req) {
+ public InputPinInSendSigActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class InputPinInSendSigActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class InputPinInSendSigActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InputPin newElement = UMLFactory.eINSTANCE.createInputPin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InputPin_3055(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InterruptibleActivityRegionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InterruptibleActivityRegionCreateCommand.java
index 62e253f5e94..09597b832db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InterruptibleActivityRegionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/InterruptibleActivityRegionCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.InterruptibleActivityRegion;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +43,7 @@ public class InterruptibleActivityRegionCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +53,25 @@ public class InterruptibleActivityRegionCreateCommand extends EditElementCommand
/**
* @generated
*/
- public InterruptibleActivityRegionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InterruptibleActivityRegionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterruptibleActivityRegionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InterruptibleActivityRegionCreateCommand(req, eObject);
+ public static InterruptibleActivityRegionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterruptibleActivityRegionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InterruptibleActivityRegionCreateCommand(CreateElementRequest req) {
+ public InterruptibleActivityRegionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +94,9 @@ public class InterruptibleActivityRegionCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterruptibleActivityRegion());
+ return data.isPermitted();
}
/**
@@ -96,8 +104,19 @@ public class InterruptibleActivityRegionCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InterruptibleActivityRegion newElement = UMLFactory.eINSTANCE.createInterruptibleActivityRegion();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPostcondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPostcondCreateCommand.java
index 0d675310250..bbd651282f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPostcondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPostcondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.IntervalConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class IntervalConstraintAsLocalPostcondCreateCommand extends EditElementC
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class IntervalConstraintAsLocalPostcondCreateCommand extends EditElementC
/**
* @generated
*/
- public IntervalConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public IntervalConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static IntervalConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new IntervalConstraintAsLocalPostcondCreateCommand(req, eObject);
+ public static IntervalConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new IntervalConstraintAsLocalPostcondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public IntervalConstraintAsLocalPostcondCreateCommand(CreateElementRequest req) {
+ public IntervalConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class IntervalConstraintAsLocalPostcondCreateCommand extends EditElementC
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class IntervalConstraintAsLocalPostcondCreateCommand extends EditElementC
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPostconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPostconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_IntervalConstraint_3033(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPrecondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPrecondCreateCommand.java
index 9e2944218db..cd74edeff5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPrecondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/IntervalConstraintAsLocalPrecondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.IntervalConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class IntervalConstraintAsLocalPrecondCreateCommand extends EditElementCo
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class IntervalConstraintAsLocalPrecondCreateCommand extends EditElementCo
/**
* @generated
*/
- public IntervalConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public IntervalConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static IntervalConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new IntervalConstraintAsLocalPrecondCreateCommand(req, eObject);
+ public static IntervalConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new IntervalConstraintAsLocalPrecondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public IntervalConstraintAsLocalPrecondCreateCommand(CreateElementRequest req) {
+ public IntervalConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class IntervalConstraintAsLocalPrecondCreateCommand extends EditElementCo
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class IntervalConstraintAsLocalPrecondCreateCommand extends EditElementCo
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPreconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPreconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_IntervalConstraint_3032(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/JoinNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/JoinNodeCreateCommand.java
index ea200d7a41d..cd43b5d2911 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/JoinNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/JoinNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.JoinNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class JoinNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class JoinNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public JoinNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public JoinNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static JoinNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new JoinNodeCreateCommand(req, eObject);
+ public static JoinNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new JoinNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public JoinNodeCreateCommand(CreateElementRequest req) {
+ public JoinNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class JoinNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getJoinNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class JoinNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
JoinNode newElement = UMLFactory.eINSTANCE.createJoinNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_JoinNode_3041(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/LoopNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/LoopNodeCreateCommand.java
index 5ba4a4b306a..de97d28b9da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/LoopNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/LoopNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.LoopNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class LoopNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class LoopNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LoopNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LoopNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LoopNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LoopNodeCreateCommand(req, eObject);
+ public static LoopNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LoopNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LoopNodeCreateCommand(CreateElementRequest req) {
+ public LoopNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class LoopNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLoopNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class LoopNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LoopNode newElement = UMLFactory.eINSTANCE.createLoopNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LoopNode_3071(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/MergeNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/MergeNodeCreateCommand.java
index bc789c240a3..b20ea9bb123 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/MergeNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/MergeNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.MergeNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class MergeNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class MergeNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MergeNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public MergeNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static MergeNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new MergeNodeCreateCommand(req, eObject);
+ public static MergeNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new MergeNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public MergeNodeCreateCommand(CreateElementRequest req) {
+ public MergeNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class MergeNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getMergeNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class MergeNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
MergeNode newElement = UMLFactory.eINSTANCE.createMergeNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_MergeNode_3039(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OpaqueActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OpaqueActionCreateCommand.java
index 39b2c4d63ab..14f3dc8ac28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OpaqueActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OpaqueActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OpaqueActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OpaqueActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OpaqueActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OpaqueActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OpaqueActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OpaqueActionCreateCommand(req, eObject);
+ public static OpaqueActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OpaqueActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OpaqueActionCreateCommand(CreateElementRequest req) {
+ public OpaqueActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OpaqueActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OpaqueActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OpaqueAction newElement = UMLFactory.eINSTANCE.createOpaqueAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OpaqueAction_3007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAcceptEventActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAcceptEventActionCreateCommand.java
index 4297469cbae..52689618420 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAcceptEventActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAcceptEventActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.AcceptEventAction;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInAcceptEventActionCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInAcceptEventActionCreateCommand extends EditElementComman
/**
* @generated
*/
- public OutputPinInAcceptEventActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInAcceptEventActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInAcceptEventActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInAcceptEventActionCreateCommand(req, eObject);
+ public static OutputPinInAcceptEventActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInAcceptEventActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInAcceptEventActionCreateCommand(CreateElementRequest req) {
+ public OutputPinInAcceptEventActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInAcceptEventActionCreateCommand extends EditElementComman
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInAcceptEventActionCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- AcceptEventAction owner = (AcceptEventAction)getElementToEdit();
- owner.getResults().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ AcceptEventAction qualifiedTarget = (AcceptEventAction)target;
+ qualifiedTarget.getResults().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3064(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand.java
index bcaf10e0bbf..d8011a193c7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.WriteStructuralFeatureAction;
/**
@@ -39,7 +44,7 @@ public class OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand ext
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand ext
/**
* @generated
*/
- public OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(req, eObject);
+ public static OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(CreateElementRequest req) {
+ public OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand ext
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class OutputPinInAddStructuralFeatureValueActionAsResultCreateCommand ext
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- WriteStructuralFeatureAction owner = (WriteStructuralFeatureAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ WriteStructuralFeatureAction qualifiedTarget = (WriteStructuralFeatureAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3094(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallBeActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallBeActCreateCommand.java
index 36daa3de0a0..f665b5d6bbf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallBeActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallBeActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.CallAction;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OutputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInCallBeActCreateCommand(req, eObject);
+ public static OutputPinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInCallBeActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInCallBeActCreateCommand(CreateElementRequest req) {
+ public OutputPinInCallBeActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInCallBeActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInCallBeActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- CallAction owner = (CallAction)getElementToEdit();
- owner.getResults().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CallAction qualifiedTarget = (CallAction)target;
+ qualifiedTarget.getResults().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3020(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallOpActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallOpActCreateCommand.java
index 3c4b694c1d9..908bdc071c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallOpActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCallOpActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.CallAction;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OutputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInCallOpActCreateCommand(req, eObject);
+ public static OutputPinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInCallOpActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInCallOpActCreateCommand(CreateElementRequest req) {
+ public OutputPinInCallOpActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInCallOpActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInCallOpActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- CallAction owner = (CallAction)getElementToEdit();
- owner.getResults().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CallAction qualifiedTarget = (CallAction)target;
+ qualifiedTarget.getResults().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3024(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCreateObjectActionAsResultCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCreateObjectActionAsResultCreateCommand.java
index be7b0121c1b..b85f48a96d2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCreateObjectActionAsResultCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInCreateObjectActionAsResultCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.CreateObjectAction;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInCreateObjectActionAsResultCreateCommand extends EditElem
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInCreateObjectActionAsResultCreateCommand extends EditElem
/**
* @generated
*/
- public OutputPinInCreateObjectActionAsResultCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInCreateObjectActionAsResultCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInCreateObjectActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInCreateObjectActionAsResultCreateCommand(req, eObject);
+ public static OutputPinInCreateObjectActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInCreateObjectActionAsResultCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInCreateObjectActionAsResultCreateCommand(CreateElementRequest req) {
+ public OutputPinInCreateObjectActionAsResultCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class OutputPinInCreateObjectActionAsResultCreateCommand extends EditElem
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class OutputPinInCreateObjectActionAsResultCreateCommand extends EditElem
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- CreateObjectAction owner = (CreateObjectAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CreateObjectAction qualifiedTarget = (CreateObjectAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3087(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsBodyOutputVariableCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsBodyOutputVariableCreateCommand.java
index ec814e76657..0da0acf264b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsBodyOutputVariableCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsBodyOutputVariableCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.LoopNode;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInLoopNodeAsBodyOutputVariableCreateCommand extends EditEl
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInLoopNodeAsBodyOutputVariableCreateCommand extends EditEl
/**
* @generated
*/
- public OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInLoopNodeAsBodyOutputVariableCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(req, eObject);
+ public static OutputPinInLoopNodeAsBodyOutputVariableCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(CreateElementRequest req) {
+ public OutputPinInLoopNodeAsBodyOutputVariableCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInLoopNodeAsBodyOutputVariableCreateCommand extends EditEl
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInLoopNodeAsBodyOutputVariableCreateCommand extends EditEl
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- LoopNode owner = (LoopNode)getElementToEdit();
- owner.getBodyOutputs().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ LoopNode qualifiedTarget = (LoopNode)target;
+ qualifiedTarget.getBodyOutputs().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3109(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsLoopVariableCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsLoopVariableCreateCommand.java
index 4ec50a4892f..9b8a365e26d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsLoopVariableCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsLoopVariableCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.LoopNode;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInLoopNodeAsLoopVariableCreateCommand extends EditElementC
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInLoopNodeAsLoopVariableCreateCommand extends EditElementC
/**
* @generated
*/
- public OutputPinInLoopNodeAsLoopVariableCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInLoopNodeAsLoopVariableCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInLoopNodeAsLoopVariableCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInLoopNodeAsLoopVariableCreateCommand(req, eObject);
+ public static OutputPinInLoopNodeAsLoopVariableCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInLoopNodeAsLoopVariableCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInLoopNodeAsLoopVariableCreateCommand(CreateElementRequest req) {
+ public OutputPinInLoopNodeAsLoopVariableCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInLoopNodeAsLoopVariableCreateCommand extends EditElementC
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInLoopNodeAsLoopVariableCreateCommand extends EditElementC
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- LoopNode owner = (LoopNode)getElementToEdit();
- owner.getLoopVariables().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ LoopNode qualifiedTarget = (LoopNode)target;
+ qualifiedTarget.getLoopVariables().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3110(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsResultCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsResultCreateCommand.java
index cd1d7b416ef..8141781ae83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsResultCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInLoopNodeAsResultCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.LoopNode;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInLoopNodeAsResultCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInLoopNodeAsResultCreateCommand extends EditElementCommand
/**
* @generated
*/
- public OutputPinInLoopNodeAsResultCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInLoopNodeAsResultCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInLoopNodeAsResultCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInLoopNodeAsResultCreateCommand(req, eObject);
+ public static OutputPinInLoopNodeAsResultCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInLoopNodeAsResultCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInLoopNodeAsResultCreateCommand(CreateElementRequest req) {
+ public OutputPinInLoopNodeAsResultCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInLoopNodeAsResultCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInLoopNodeAsResultCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- LoopNode owner = (LoopNode)getElementToEdit();
- owner.getResults().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ LoopNode qualifiedTarget = (LoopNode)target;
+ qualifiedTarget.getResults().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3111(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInOpaqueActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInOpaqueActCreateCommand.java
index a1b8fd3546e..5b0587134fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInOpaqueActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInOpaqueActCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OutputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInOpaqueActCreateCommand(req, eObject);
+ public static OutputPinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInOpaqueActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInOpaqueActCreateCommand(CreateElementRequest req) {
+ public OutputPinInOpaqueActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class OutputPinInOpaqueActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class OutputPinInOpaqueActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- OpaqueAction owner = (OpaqueAction)getElementToEdit();
- owner.getOutputValues().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ OpaqueAction qualifiedTarget = (OpaqueAction)target;
+ qualifiedTarget.getOutputValues().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3014(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadStructuralFeatureAsResultCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadStructuralFeatureAsResultCreateCommand.java
index 8d73defd5db..42c451db7ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadStructuralFeatureAsResultCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadStructuralFeatureAsResultCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInReadStructuralFeatureAsResultCreateCommand extends EditE
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInReadStructuralFeatureAsResultCreateCommand extends EditE
/**
* @generated
*/
- public OutputPinInReadStructuralFeatureAsResultCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInReadStructuralFeatureAsResultCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInReadStructuralFeatureAsResultCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInReadStructuralFeatureAsResultCreateCommand(req, eObject);
+ public static OutputPinInReadStructuralFeatureAsResultCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInReadStructuralFeatureAsResultCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInReadStructuralFeatureAsResultCreateCommand(CreateElementRequest req) {
+ public OutputPinInReadStructuralFeatureAsResultCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class OutputPinInReadStructuralFeatureAsResultCreateCommand extends EditE
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class OutputPinInReadStructuralFeatureAsResultCreateCommand extends EditE
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- ReadStructuralFeatureAction owner = (ReadStructuralFeatureAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ ReadStructuralFeatureAction qualifiedTarget = (ReadStructuralFeatureAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3090(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadVariableActionAsResultCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadVariableActionAsResultCreateCommand.java
index 3c03559603f..39195a300f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadVariableActionAsResultCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInReadVariableActionAsResultCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.ReadVariableAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class OutputPinInReadVariableActionAsResultCreateCommand extends EditElem
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInReadVariableActionAsResultCreateCommand extends EditElem
/**
* @generated
*/
- public OutputPinInReadVariableActionAsResultCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInReadVariableActionAsResultCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInReadVariableActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInReadVariableActionAsResultCreateCommand(req, eObject);
+ public static OutputPinInReadVariableActionAsResultCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInReadVariableActionAsResultCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInReadVariableActionAsResultCreateCommand(CreateElementRequest req) {
+ public OutputPinInReadVariableActionAsResultCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class OutputPinInReadVariableActionAsResultCreateCommand extends EditElem
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class OutputPinInReadVariableActionAsResultCreateCommand extends EditElem
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- ReadVariableAction owner = (ReadVariableAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ ReadVariableAction qualifiedTarget = (ReadVariableAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3098(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInValSpecActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInValSpecActCreateCommand.java
index 0eded1cae74..793f1cd29e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInValSpecActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/OutputPinInValSpecActCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValueSpecificationAction;
/**
@@ -39,7 +44,7 @@ public class OutputPinInValSpecActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class OutputPinInValSpecActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OutputPinInValSpecActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OutputPinInValSpecActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OutputPinInValSpecActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OutputPinInValSpecActCreateCommand(req, eObject);
+ public static OutputPinInValSpecActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OutputPinInValSpecActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OutputPinInValSpecActCreateCommand(CreateElementRequest req) {
+ public OutputPinInValSpecActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class OutputPinInValSpecActCreateCommand extends EditElementCommand {
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class OutputPinInValSpecActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- ValueSpecificationAction owner = (ValueSpecificationAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ ValueSpecificationAction qualifiedTarget = (ValueSpecificationAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3077(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ParameterCreateCommand.java
index b1b6c7aa15a..484d745ea62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ParameterCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ParameterCreateCommand(req, eObject);
+ public static ParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ParameterCreateCommand(CreateElementRequest req) {
+ public ParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ParameterCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getParameter());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ParameterCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Parameter newElement = UMLFactory.eINSTANCE.createParameter();
- Behavior owner = (Behavior)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Behavior qualifiedTarget = (Behavior)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Parameter_3001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionCreateCommand.java
index 19f7ff0e9a9..126c4e38279 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ReadSelfAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ReadSelfActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ReadSelfActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReadSelfActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReadSelfActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReadSelfActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReadSelfActionCreateCommand(req, eObject);
+ public static ReadSelfActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReadSelfActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReadSelfActionCreateCommand(CreateElementRequest req) {
+ public ReadSelfActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ReadSelfActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReadSelfAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ReadSelfActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ReadSelfAction newElement = UMLFactory.eINSTANCE.createReadSelfAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ReadSelfAction_3081(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionOutputPinCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionOutputPinCreateCommand.java
index 50979cda482..cffa4d35b2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionOutputPinCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadSelfActionOutputPinCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OutputPin;
import org.eclipse.uml2.uml.ReadSelfAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ReadSelfActionOutputPinCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ReadSelfActionOutputPinCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReadSelfActionOutputPinCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReadSelfActionOutputPinCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReadSelfActionOutputPinCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReadSelfActionOutputPinCreateCommand(req, eObject);
+ public static ReadSelfActionOutputPinCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReadSelfActionOutputPinCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReadSelfActionOutputPinCreateCommand(CreateElementRequest req) {
+ public ReadSelfActionOutputPinCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ReadSelfActionOutputPinCreateCommand extends EditElementCommand {
if(container.getResult() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOutputPin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ReadSelfActionOutputPinCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OutputPin newElement = UMLFactory.eINSTANCE.createOutputPin();
- ReadSelfAction owner = (ReadSelfAction)getElementToEdit();
- owner.setResult(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ ReadSelfAction qualifiedTarget = (ReadSelfAction)target;
+ qualifiedTarget.setResult(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OutputPin_3084(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadStructuralFeatureActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadStructuralFeatureActionCreateCommand.java
index b54218a10c4..74ee04263dd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadStructuralFeatureActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadStructuralFeatureActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ReadStructuralFeatureAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ReadStructuralFeatureActionCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ReadStructuralFeatureActionCreateCommand extends EditElementCommand
/**
* @generated
*/
- public ReadStructuralFeatureActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReadStructuralFeatureActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReadStructuralFeatureActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReadStructuralFeatureActionCreateCommand(req, eObject);
+ public static ReadStructuralFeatureActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReadStructuralFeatureActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReadStructuralFeatureActionCreateCommand(CreateElementRequest req) {
+ public ReadStructuralFeatureActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ReadStructuralFeatureActionCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReadStructuralFeatureAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ReadStructuralFeatureActionCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ReadStructuralFeatureAction newElement = UMLFactory.eINSTANCE.createReadStructuralFeatureAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ReadStructuralFeatureAction_3088(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadVariableActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadVariableActionCreateCommand.java
index 68fa93af06b..2639fe45d95 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadVariableActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ReadVariableActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.ReadVariableAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class ReadVariableActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ReadVariableActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReadVariableActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReadVariableActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReadVariableActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReadVariableActionCreateCommand(req, eObject);
+ public static ReadVariableActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReadVariableActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReadVariableActionCreateCommand(CreateElementRequest req) {
+ public ReadVariableActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ReadVariableActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReadVariableAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ReadVariableActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ReadVariableAction newElement = UMLFactory.eINSTANCE.createReadVariableAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ReadVariableAction_3097(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendObjectActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendObjectActionCreateCommand.java
index d8ca5eb2439..88fe19a0056 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendObjectActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendObjectActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class SendObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class SendObjectActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SendObjectActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SendObjectActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SendObjectActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SendObjectActionCreateCommand(req, eObject);
+ public static SendObjectActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SendObjectActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SendObjectActionCreateCommand(CreateElementRequest req) {
+ public SendObjectActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class SendObjectActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSendObjectAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class SendObjectActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
SendObjectAction newElement = UMLFactory.eINSTANCE.createSendObjectAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_SendObjectAction_3042(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendSignalActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendSignalActionCreateCommand.java
index 868fb239d47..7bb848d5379 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendSignalActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SendSignalActionCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.SendSignalAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class SendSignalActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class SendSignalActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SendSignalActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SendSignalActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SendSignalActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SendSignalActionCreateCommand(req, eObject);
+ public static SendSignalActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SendSignalActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SendSignalActionCreateCommand(CreateElementRequest req) {
+ public SendSignalActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class SendSignalActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSendSignalAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class SendSignalActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
SendSignalAction newElement = UMLFactory.eINSTANCE.createSendSignalAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_SendSignalAction_3052(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SequenceNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SequenceNodeCreateCommand.java
index 3b199357ab6..e2e9ce61742 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SequenceNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/SequenceNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.SequenceNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class SequenceNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class SequenceNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SequenceNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SequenceNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SequenceNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SequenceNodeCreateCommand(req, eObject);
+ public static SequenceNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SequenceNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SequenceNodeCreateCommand(CreateElementRequest req) {
+ public SequenceNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class SequenceNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSequenceNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class SequenceNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
SequenceNode newElement = UMLFactory.eINSTANCE.createSequenceNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_SequenceNode_3073(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ShapeNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ShapeNamedElementCreateCommand.java
index 4fc9ed1d7a1..b4ef5236729 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ShapeNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ShapeNamedElementCreateCommand.java
@@ -25,8 +25,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShapeNamedElementCreateCommand(req, eObject);
+ public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShapeNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/StructuredActivityNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/StructuredActivityNodeCreateCommand.java
index 128a37286de..13d9fe65805 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/StructuredActivityNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/StructuredActivityNodeCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.StructuredActivityNode;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class StructuredActivityNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class StructuredActivityNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public StructuredActivityNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StructuredActivityNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StructuredActivityNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StructuredActivityNodeCreateCommand(req, eObject);
+ public static StructuredActivityNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StructuredActivityNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StructuredActivityNodeCreateCommand(CreateElementRequest req) {
+ public StructuredActivityNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class StructuredActivityNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStructuredActivityNode());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class StructuredActivityNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StructuredActivityNode newElement = UMLFactory.eINSTANCE.createStructuredActivityNode();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedGroups().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedGroups().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StructuredActivityNode_3065(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPostcondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPostcondCreateCommand.java
index 368855db5ab..96070fb3e8d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPostcondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPostcondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class TimeConstraintAsLocalPostcondCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class TimeConstraintAsLocalPostcondCreateCommand extends EditElementComma
/**
* @generated
*/
- public TimeConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintAsLocalPostcondCreateCommand(req, eObject);
+ public static TimeConstraintAsLocalPostcondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintAsLocalPostcondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintAsLocalPostcondCreateCommand(CreateElementRequest req) {
+ public TimeConstraintAsLocalPostcondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class TimeConstraintAsLocalPostcondCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class TimeConstraintAsLocalPostcondCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPostconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPostconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeConstraint_3037(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPrecondCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPrecondCreateCommand.java
index c968499f663..03bbc824cb8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPrecondCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/TimeConstraintAsLocalPrecondCreateCommand.java
@@ -25,11 +25,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +44,7 @@ public class TimeConstraintAsLocalPrecondCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class TimeConstraintAsLocalPrecondCreateCommand extends EditElementComman
/**
* @generated
*/
- public TimeConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintAsLocalPrecondCreateCommand(req, eObject);
+ public static TimeConstraintAsLocalPrecondCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintAsLocalPrecondCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintAsLocalPrecondCreateCommand(CreateElementRequest req) {
+ public TimeConstraintAsLocalPrecondCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class TimeConstraintAsLocalPrecondCreateCommand extends EditElementComman
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class TimeConstraintAsLocalPrecondCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- Action owner = (Action)getElementToEdit();
- owner.getLocalPreconditions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Action qualifiedTarget = (Action)target;
+ qualifiedTarget.getLocalPreconditions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeConstraint_3036(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallBeActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallBeActCreateCommand.java
index b6cab8f262f..47d55238ed7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallBeActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallBeActCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInCallBeActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValuePinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInCallBeActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInCallBeActCreateCommand(req, eObject);
+ public static ValuePinInCallBeActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInCallBeActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInCallBeActCreateCommand(CreateElementRequest req) {
+ public ValuePinInCallBeActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ValuePinInCallBeActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ValuePinInCallBeActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3017(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActAsTargetCreateCommand.java
index 36e1468d3bf..62f7143c4d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActAsTargetCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.CallOperationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInCallOpActAsTargetCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInCallOpActAsTargetCreateCommand extends EditElementCommand
/**
* @generated
*/
- public ValuePinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInCallOpActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInCallOpActAsTargetCreateCommand(req, eObject);
+ public static ValuePinInCallOpActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInCallOpActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInCallOpActAsTargetCreateCommand(CreateElementRequest req) {
+ public ValuePinInCallOpActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ValuePinInCallOpActAsTargetCreateCommand extends EditElementCommand
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ValuePinInCallOpActAsTargetCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- CallOperationAction owner = (CallOperationAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CallOperationAction qualifiedTarget = (CallOperationAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3025(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActCreateCommand.java
index 12100e21239..fe50e074379 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInCallOpActCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInCallOpActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValuePinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInCallOpActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInCallOpActCreateCommand(req, eObject);
+ public static ValuePinInCallOpActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInCallOpActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInCallOpActCreateCommand(CreateElementRequest req) {
+ public ValuePinInCallOpActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ValuePinInCallOpActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ValuePinInCallOpActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3022(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInOpaqueActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInOpaqueActCreateCommand.java
index a043476a1c0..45875bb7f01 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInOpaqueActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInOpaqueActCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInOpaqueActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValuePinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInOpaqueActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInOpaqueActCreateCommand(req, eObject);
+ public static ValuePinInOpaqueActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInOpaqueActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInOpaqueActCreateCommand(CreateElementRequest req) {
+ public ValuePinInOpaqueActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ValuePinInOpaqueActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ValuePinInOpaqueActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- OpaqueAction owner = (OpaqueAction)getElementToEdit();
- owner.getInputValues().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ OpaqueAction qualifiedTarget = (OpaqueAction)target;
+ qualifiedTarget.getInputValues().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3015(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsReqCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsReqCreateCommand.java
index fe45c989d67..8fbdc90f523 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsReqCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsReqCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInSendObjActAsReqCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInSendObjActAsReqCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValuePinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInSendObjActAsReqCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInSendObjActAsReqCreateCommand(req, eObject);
+ public static ValuePinInSendObjActAsReqCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInSendObjActAsReqCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInSendObjActAsReqCreateCommand(CreateElementRequest req) {
+ public ValuePinInSendObjActAsReqCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ValuePinInSendObjActAsReqCreateCommand extends EditElementCommand {
if(container.getRequest() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ValuePinInSendObjActAsReqCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setRequest(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setRequest(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3046(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsTargetCreateCommand.java
index 2c2594332c3..bccb36b2fd3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendObjActAsTargetCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.SendObjectAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInSendObjActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInSendObjActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- public ValuePinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInSendObjActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInSendObjActAsTargetCreateCommand(req, eObject);
+ public static ValuePinInSendObjActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInSendObjActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInSendObjActAsTargetCreateCommand(CreateElementRequest req) {
+ public ValuePinInSendObjActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ValuePinInSendObjActAsTargetCreateCommand extends EditElementComman
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ValuePinInSendObjActAsTargetCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- SendObjectAction owner = (SendObjectAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendObjectAction qualifiedTarget = (SendObjectAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3049(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActAsTargetCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActAsTargetCreateCommand.java
index f2e6920eca6..d3ff3d6c148 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActAsTargetCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActAsTargetCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.SendSignalAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInSendSigActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInSendSigActAsTargetCreateCommand extends EditElementComman
/**
* @generated
*/
- public ValuePinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInSendSigActAsTargetCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInSendSigActAsTargetCreateCommand(req, eObject);
+ public static ValuePinInSendSigActAsTargetCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInSendSigActAsTargetCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInSendSigActAsTargetCreateCommand(CreateElementRequest req) {
+ public ValuePinInSendSigActAsTargetCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -93,7 +99,9 @@ public class ValuePinInSendSigActAsTargetCreateCommand extends EditElementComman
if(container.getTarget() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -101,8 +109,19 @@ public class ValuePinInSendSigActAsTargetCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- SendSignalAction owner = (SendSignalAction)getElementToEdit();
- owner.setTarget(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ SendSignalAction qualifiedTarget = (SendSignalAction)target;
+ qualifiedTarget.setTarget(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3060(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActCreateCommand.java
index 17ba5f1bd81..ffc59e1fae3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValuePinInSendSigActCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.InvocationAction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValuePin;
/**
@@ -39,7 +44,7 @@ public class ValuePinInSendSigActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValuePinInSendSigActCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValuePinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValuePinInSendSigActCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValuePinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValuePinInSendSigActCreateCommand(req, eObject);
+ public static ValuePinInSendSigActCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValuePinInSendSigActCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValuePinInSendSigActCreateCommand(CreateElementRequest req) {
+ public ValuePinInSendSigActCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ValuePinInSendSigActCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValuePin());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ValuePinInSendSigActCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValuePin newElement = UMLFactory.eINSTANCE.createValuePin();
- InvocationAction owner = (InvocationAction)getElementToEdit();
- owner.getArguments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InvocationAction qualifiedTarget = (InvocationAction)target;
+ qualifiedTarget.getArguments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValuePin_3054(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValueSpecificationActionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValueSpecificationActionCreateCommand.java
index c6232583ee4..4d1e5d662c3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValueSpecificationActionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/commands/ValueSpecificationActionCreateCommand.java
@@ -25,10 +25,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.activity.providers.ElementInitializers;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.ValueSpecificationAction;
/**
@@ -39,7 +44,7 @@ public class ValueSpecificationActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +54,25 @@ public class ValueSpecificationActionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ValueSpecificationActionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ValueSpecificationActionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ValueSpecificationActionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ValueSpecificationActionCreateCommand(req, eObject);
+ public static ValueSpecificationActionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ValueSpecificationActionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ValueSpecificationActionCreateCommand(CreateElementRequest req) {
+ public ValueSpecificationActionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +95,9 @@ public class ValueSpecificationActionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getValueSpecificationAction());
+ return data.isPermitted();
}
/**
@@ -97,8 +105,19 @@ public class ValueSpecificationActionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ValueSpecificationAction newElement = UMLFactory.eINSTANCE.createValueSpecificationAction();
- Activity owner = (Activity)getElementToEdit();
- owner.getOwnedNodes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Activity qualifiedTarget = (Activity)target;
+ qualifiedTarget.getOwnedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ValueSpecificationAction_3076(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
index 2fc73a4569d..cd085427658 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/part/UMLVisualIDRegistry.java
@@ -96,18 +96,9 @@ public class UMLVisualIDRegistry {
public static String getType(int visualID) {
return Integer.toString(visualID);
}
-
- /**
- * @generated
- */
+
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return ActivityDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return ActivityDiagramEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
index ecc94ac9a49..f9731a7bb5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
@@ -86,13 +86,12 @@ Require-Bundle: org.eclipse.core.expressions,
org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
org.w3c.dom.svg,
- org.apache.batik.css;bundle-version="[1.6.0,1.7.0)"
+ org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagra
- mEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz;singleton:=
- true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/ClassDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/ClassDiagramCreationCondition.java
index 5e2615fa05b..24c5fdf33a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/ClassDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/ClassDiagramCreationCondition.java
@@ -23,9 +23,6 @@ public class ClassDiagramCreationCondition extends PerspectiveContextDependence
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package;
- }
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramCommand.java
index 3f3c15c31c8..87fd9b973d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramCommand.java
@@ -26,7 +26,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
*/
public class CreateClassDiagramCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
@Override
protected String getDefaultDiagramName() {
return "ClassDiagram";
@@ -48,3 +48,4 @@ public class CreateClassDiagramCommand extends AbstractPapyrusGmfCreateDiagramCo
return org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT;
}
}
+
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramWithNavigationHandler.java
deleted file mode 100644
index 821ee063842..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/CreateClassDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateClassDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateClassDiagramWithNavigationHandler() {
- super(new CreateClassDiagramCommand(), new ClassDiagramCreationCondition());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationClassCreateCommand.java
index 7f7698176f2..1e02641a34b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationClassCreateCommand.java
@@ -20,7 +20,9 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.AssociationClassHelper;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AssociationClassLinkCreateCommand;
import org.eclipse.uml2.uml.AssociationClass;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Type;
@@ -28,32 +30,13 @@ import org.eclipse.uml2.uml.Type;
/**
* custom class to create an association
*/
-public class CAssociationClassCreateCommand extends org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AssociationClassLinkCreateCommand {
+public class CAssociationClassCreateCommand extends AssociationClassLinkCreateCommand {
- // code copy from the super class!
- protected Package deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Package) {
- return (Package)element;
- }
- }
- return null;
- }
-
- protected Package container;
-
- protected EObject source;
-
- protected EObject target;
-
- public CAssociationClassCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ private final Diagram diagram;
+
+ public CAssociationClassCreateCommand(CreateRelationshipRequest request, EObject source, EObject target, Diagram diagram) {
super(request, source, target);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
+ this.diagram = diagram;
}
/**
@@ -65,7 +48,7 @@ public class CAssociationClassCreateCommand extends org.eclipse.papyrus.uml.diag
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
if(source instanceof Type && target instanceof Type && container instanceof Package) {
- AssociationClass newElement = (AssociationClass)AssociationClassHelper.createAssociationClass(getEditingDomain(), (Type)source, (Type)target, (Package)container);
+ AssociationClass newElement = (AssociationClass)AssociationClassHelper.createAssociationClass(getEditingDomain(), (Type)source, (Type)target, (Package)container, diagram);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationCreateCommand.java
index b58e2182ade..e2da95aeac8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CAssociationCreateCommand.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.helper.ClazzDiagramAssociationHelper;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Package;
@@ -29,31 +30,12 @@ import org.eclipse.uml2.uml.Type;
* custom class to create an association
*/
public class CAssociationCreateCommand extends org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AssociationCreateCommand {
-
- // code copy from the super class!
- protected Package deduceContainer(EObject source, EObject target) {
- // Find container element for the new link.
- // Climb up by containment hierarchy starting from the source
- // and return the first element that is instance of the container class.
- for(EObject element = source; element != null; element = element.eContainer()) {
- if(element instanceof Package) {
- return (Package)element;
- }
- }
- return null;
- }
-
- protected Package container;
-
- protected EObject source;
-
- protected EObject target;
-
- public CAssociationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+
+ private final Diagram diagram;
+
+ public CAssociationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target, Diagram diagram) {
super(request, source, target);
- this.source = source;
- this.target = target;
- container = deduceContainer(source, target);
+ this.diagram = diagram;
}
/**
@@ -65,7 +47,7 @@ public class CAssociationCreateCommand extends org.eclipse.papyrus.uml.diagram.c
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
if(source instanceof Type && target instanceof Type && container instanceof Package) {
- Association newElement = (Association)ClazzDiagramAssociationHelper.createAssociation(getEditingDomain(), (Type)source, (Type)target, (Package)container);
+ Association newElement = (Association)ClazzDiagramAssociationHelper.createAssociation(getEditingDomain(), (Type)source, (Type)target, (Package)container, diagram);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CClassifierTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CClassifierTemplateParameterCreateCommand.java
index b6dd4c1aa96..2e54924efa7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CClassifierTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CClassifierTemplateParameterCreateCommand.java
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.ui.TemplateParameterConfigurationDialog;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassifierTemplateParameterCreateCommand;
import org.eclipse.swt.SWT;
@@ -28,8 +29,8 @@ import org.eclipse.uml2.uml.UMLPackage;
public class CClassifierTemplateParameterCreateCommand extends ClassifierTemplateParameterCreateCommand {
- public CClassifierTemplateParameterCreateCommand(CreateElementRequest req) {
- super(req);
+ public CClassifierTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CConnectableElementTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CConnectableElementTemplateParameterCreateCommand.java
index 3334140757f..604036c486c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CConnectableElementTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CConnectableElementTemplateParameterCreateCommand.java
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.ui.TemplateParameterConfigurationDialog;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ConnectableElementTemplateParameterCreateCommand;
import org.eclipse.swt.SWT;
@@ -28,8 +29,8 @@ import org.eclipse.uml2.uml.UMLPackage;
public class CConnectableElementTemplateParameterCreateCommand extends ConnectableElementTemplateParameterCreateCommand {
- public CConnectableElementTemplateParameterCreateCommand(CreateElementRequest req) {
- super(req);
+ public CConnectableElementTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/COperationTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/COperationTemplateParameterCreateCommand.java
index c63641e8440..8b9e9eb5407 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/COperationTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/COperationTemplateParameterCreateCommand.java
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.ui.TemplateParameterConfigurationDialog;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationTemplateParameterCreateCommand;
import org.eclipse.swt.SWT;
@@ -28,8 +29,8 @@ import org.eclipse.uml2.uml.UMLPackage;
public class COperationTemplateParameterCreateCommand extends OperationTemplateParameterCreateCommand {
- public COperationTemplateParameterCreateCommand(CreateElementRequest req) {
- super(req);
+ public COperationTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CTemplateParameterCreateCommand.java
index d2c6ab63291..b0f8b5fc9fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CTemplateParameterCreateCommand.java
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.ui.TemplateParameterConfigurationDialog;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.TemplateParameterCreateCommand;
import org.eclipse.swt.SWT;
@@ -31,8 +32,8 @@ import org.eclipse.uml2.uml.UMLPackage;
public class CTemplateParameterCreateCommand extends TemplateParameterCreateCommand {
- public CTemplateParameterCreateCommand(CreateElementRequest req) {
- super(req);
+ public CTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationClassSupplement.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationClassSupplement.java
index 0f4ce11e9db..cf56476d6c4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationClassSupplement.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationClassSupplement.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -52,8 +53,8 @@ public class CreateAssociationClassSupplement extends SupplementCommand {
* @param target
* the target of the association (Type)
*/
- public CreateAssociationClassSupplement(EObject container, EObject source, EObject target) {
- super(container, source, target);
+ public CreateAssociationClassSupplement(EObject container, EObject source, EObject target, Diagram diagram) {
+ super(container, source, target, diagram);
}
/**
@@ -82,7 +83,7 @@ public class CreateAssociationClassSupplement extends SupplementCommand {
AssociationClass association = UMLFactory.eINSTANCE.createAssociationClass();
// create target property
CreateElementRequest request = new CreateElementRequest(domain, getSource(), UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute());
- EditElementCommand c = new PropertyForComponentCreateCommand(request);
+ EditElementCommand c = new PropertyForComponentCreateCommand(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
@@ -98,7 +99,7 @@ public class CreateAssociationClassSupplement extends SupplementCommand {
targetProperty.setUpper(1);
// create source property
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- c = new PropertyCommandForAssociation(request);
+ c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationSupplement.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationSupplement.java
index eca03b905ba..426c57ec2fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationSupplement.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CreateAssociationSupplement.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.papyrus.uml.diagram.common.commands.SupplementCommand;
@@ -49,8 +50,8 @@ public class CreateAssociationSupplement extends SupplementCommand {
* @param target
* the target of the association (Type)
*/
- public CreateAssociationSupplement(EObject container, EObject source, EObject target) {
- super(container, source, target);
+ public CreateAssociationSupplement(EObject container, EObject source, EObject target, Diagram diagram) {
+ super(container, source, target, diagram);
}
/**
@@ -79,7 +80,7 @@ public class CreateAssociationSupplement extends SupplementCommand {
Association association = UMLFactory.eINSTANCE.createAssociation();
// create target property
CreateElementRequest request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- EditElementCommand c = new PropertyCommandForAssociation(request);
+ EditElementCommand c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
@@ -95,7 +96,7 @@ public class CreateAssociationSupplement extends SupplementCommand {
targetProperty.setUpper(1);
// create source property
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- c = new PropertyCommandForAssociation(request);
+ c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomContextLinkCreateCommand.java
index 0546ca454c4..874db1307ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomContextLinkCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/CustomContextLinkCreateCommand.java
@@ -80,7 +80,7 @@ public class CustomContextLinkCreateCommand extends ContextLinkCreateCommand {
}
}
}
- if(resolveTargetNamespace() != null && (resolveTargetNamespace().getOwnedRules().contains(resolveTargetNamespace()))) {
+ if (getTarget() != null && (getTarget().getOwnedRules().contains(getTarget()))) {
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
index 28152ba4e4d..ed794578867 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Association;
@@ -39,8 +40,8 @@ public class PropertyCommandForAssociation extends PropertyForComponentCreateCom
* @param req
* the req to launch the command
*/
- public PropertyCommandForAssociation(CreateElementRequest req) {
- super(req);
+ public PropertyCommandForAssociation(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
index 35c2aed9e19..972ab9669b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/AssociationClassHelper.java
@@ -45,6 +45,7 @@ import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.AssociationClassViewCreateCommand;
@@ -68,11 +69,11 @@ import org.eclipse.uml2.uml.UMLPackage;
*/
public class AssociationClassHelper extends ElementHelper {
- public static EObject createAssociationClass(TransactionalEditingDomain domain, Type source, Type target, Package container) {
+ public static EObject createAssociationClass(TransactionalEditingDomain domain, Type source, Type target, Package container, Diagram diagram) {
AssociationClass association = UMLFactory.eINSTANCE.createAssociationClass();
// create target property
CreateElementRequest request = new CreateElementRequest(domain, source, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getStructuredClassifier_OwnedAttribute());
- EditElementCommand c = new PropertyForComponentCreateCommand(request);
+ EditElementCommand c = new PropertyForComponentCreateCommand(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
@@ -88,7 +89,7 @@ public class AssociationClassHelper extends ElementHelper {
targetProperty.setUpper(1);
// create source property
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- c = new PropertyCommandForAssociation(request);
+ c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClazzDiagramAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClazzDiagramAssociationHelper.java
index 4ff07e65462..204b1612079 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClazzDiagramAssociationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/ClazzDiagramAssociationHelper.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.PropertyCommandForAssociation;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -38,13 +39,14 @@ import org.eclipse.uml2.uml.UMLPackage;
*/
public class ClazzDiagramAssociationHelper {
- public static EObject createAssociation(TransactionalEditingDomain domain, Type source, Type target, Package container) {
+ public static EObject createAssociation(TransactionalEditingDomain domain, Type source, Type target, Package container, Diagram diagram) {
Association association = UMLFactory.eINSTANCE.createAssociation();
String targetString = target.getName().substring(0, 1).toLowerCase() + target.getName().substring(1, target.getName().length());
String sourceString = source.getName().substring(0, 1).toLowerCase() + source.getName().substring(1, source.getName().length());
+
// create target property
CreateElementRequest request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- EditElementCommand c = new PropertyCommandForAssociation(request);
+ EditElementCommand c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
@@ -63,9 +65,10 @@ public class ClazzDiagramAssociationHelper {
if(source instanceof StructuredClassifier) {
((StructuredClassifier)source).getOwnedAttributes().add(targetProperty);
}
+
// create source property
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- c = new PropertyCommandForAssociation(request);
+ c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
index 4d49fb55794..254391c88c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/MultiAssociationHelper.java
@@ -51,6 +51,7 @@ import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.AssociationDiamonViewCreateCommand;
@@ -350,7 +351,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
// 3.1 creation of the property
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3005, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement);
- EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request);
+ EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(sourceEditPart));
propertyCreateCommand.setReuseParentTransaction(true);
((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
// 3. Node creation at this position
@@ -424,7 +425,7 @@ public class MultiAssociationHelper extends org.eclipse.papyrus.uml.diagram.comm
// 0. add semantic
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3005, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement);
- EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request);
+ EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(targetEditPart));
((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
//System.err.println("0. add semantic, can execute?" + command.canExecute());
// 1. add the branch graphically
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
index 920906e4899..01ca20f156e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
@@ -14,6 +14,7 @@ package org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CClassifierTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CConnectableElementTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.COperationTemplateParameterCreateCommand;
@@ -35,16 +36,16 @@ public class CRedefinableTemplateSignatureTemplateParameterCompartmentItemSemant
*/
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ClassifierTemplateParameter_3031 == req.getElementType()) {
- return getGEFWrapper(new CClassifierTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new CClassifierTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectableElementTemplateParameter_3034 == req.getElementType()) {
- return getGEFWrapper(new CConnectableElementTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new CConnectableElementTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OperationTemplateParameter_3035 == req.getElementType()) {
- return getGEFWrapper(new COperationTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new COperationTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateParameter_3016 == req.getElementType()) {
- return getGEFWrapper(new CTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new CTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
index 127f6d7def2..4171d07418d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
@@ -14,6 +14,7 @@ package org.eclipse.papyrus.uml.diagram.clazz.custom.policies.itemsemantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CClassifierTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.COperationTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CTemplateParameterCreateCommand;
@@ -34,13 +35,13 @@ public class CTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolic
*/
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ClassifierTemplateParameter_3031 == req.getElementType()) {
- return getGEFWrapper(new CClassifierTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new CClassifierTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OperationTemplateParameter_3035 == req.getElementType()) {
- return getGEFWrapper(new COperationTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new COperationTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateParameter_3016 == req.getElementType()) {
- return getGEFWrapper(new CTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new CTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationBranchItemSemanticEditPolicy.java
index dea4b21ae7d..3006ab93750 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationBranchItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -38,10 +39,10 @@ public class CustomAssociationBranchItemSemanticEditPolicy extends AssociationBr
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassItemSemanticEditPolicy.java
index df323772e2e..00d6c98592c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -36,10 +37,10 @@ public class CustomAssociationClassItemSemanticEditPolicy extends org.eclipse.pa
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
@@ -65,10 +66,10 @@ public class CustomAssociationClassItemSemanticEditPolicy extends org.eclipse.pa
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassLinkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassLinkItemSemanticEditPolicy.java
index 3ec21e61f38..9db627adf61 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassLinkItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationClassLinkItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -37,10 +38,10 @@ public class CustomAssociationClassLinkItemSemanticEditPolicy extends Associatio
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
@@ -66,10 +67,10 @@ public class CustomAssociationClassLinkItemSemanticEditPolicy extends Associatio
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationItemSemanticEditPolicy.java
index 2762f4e9e7d..56e770bc998 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationItemSemanticEditPolicy.java
@@ -25,14 +25,17 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationClassLinkEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Property;
@@ -40,7 +43,7 @@ import org.eclipse.uml2.uml.Property;
/**
* this a specialization to manage creation of association and associationClass
*/
-public class CustomAssociationItemSemanticEditPolicy extends org.eclipse.papyrus.uml.diagram.clazz.edit.policies.AssociationItemSemanticEditPolicy {
+public class CustomAssociationItemSemanticEditPolicy extends AssociationItemSemanticEditPolicy {
/**
*
@@ -48,10 +51,10 @@ public class CustomAssociationItemSemanticEditPolicy extends org.eclipse.papyrus
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
@@ -108,10 +111,10 @@ public class CustomAssociationItemSemanticEditPolicy extends org.eclipse.papyrus
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationNodeItemSemanticEditPolicy.java
index cd041184325..ccac1a93086 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomAssociationNodeItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -38,10 +39,10 @@ public class CustomAssociationNodeItemSemanticEditPolicy extends AssociationNode
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java
index 12ec9709f38..312a65a37c7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -57,10 +58,10 @@ public class CustomClassItemSemanticEditPolicy extends ClassItemSemanticEditPoli
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -91,10 +92,10 @@ public class CustomClassItemSemanticEditPolicy extends ClassItemSemanticEditPoli
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
index c5464df2635..f64f1cdc631 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -53,10 +54,10 @@ public class CustomClassItemSemanticEditPolicyCN extends ClassItemSemanticEditPo
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -89,10 +90,10 @@ public class CustomClassItemSemanticEditPolicyCN extends ClassItemSemanticEditPo
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicy.java
index f2252fbf4cd..b0cf1985d8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomComponentItemSemanticEditPolicy extends ComponentItemSemantic
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomComponentItemSemanticEditPolicy extends ComponentItemSemantic
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicyCN.java
index bea723b9043..eb13c215542 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomComponentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomComponentItemSemanticEditPolicyCN extends ComponentItemSemant
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomComponentItemSemanticEditPolicyCN extends ComponentItemSemant
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicy.java
index 8c2e22c4d69..11ad22349c6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomDataTypeItemSemanticEditPolicy extends DataTypeItemSemanticEd
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomDataTypeItemSemanticEditPolicy extends DataTypeItemSemanticEd
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicyCN.java
index 02f255ad0cc..d6420f68110 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomDataTypeItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomDataTypeItemSemanticEditPolicyCN extends DataTypeItemSemantic
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomDataTypeItemSemanticEditPolicyCN extends DataTypeItemSemantic
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicy.java
index 4a0d116f724..dc66c947a3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomEnumerationItemSemanticEditPolicy extends EnumerationItemSema
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomEnumerationItemSemanticEditPolicy extends EnumerationItemSema
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicyCN.java
index 8b8fcb8aaca..c128be14cbc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomEnumerationItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomEnumerationItemSemanticEditPolicyCN extends EnumerationItemSe
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomEnumerationItemSemanticEditPolicyCN extends EnumerationItemSe
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInformationItemItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInformationItemItemSemanticEditPolicy.java
index 9da9cf648c1..7bf374e7eaf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInformationItemItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInformationItemItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -38,10 +39,10 @@ public class CustomInformationItemItemSemanticEditPolicy extends InformationItem
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicy.java
index 29e45b968c1..2cf72581eab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomInterfaceItemSemanticEditPolicy extends InterfaceItemSemantic
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomInterfaceItemSemanticEditPolicy extends InterfaceItemSemantic
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicyCN.java
index a2fcdc95398..7b36f7c7a2b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomInterfaceItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomInterfaceItemSemanticEditPolicyCN extends InterfaceItemSemant
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomInterfaceItemSemanticEditPolicyCN extends InterfaceItemSemant
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java
index 680883136b0..8f899417030 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomPrimitiveTypeItemSemanticEditPolicy extends PrimitiveTypeItem
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomPrimitiveTypeItemSemanticEditPolicy extends PrimitiveTypeItem
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java
index 133e8a50a8b..9091a6bac87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomPrimitiveTypeItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
@@ -41,10 +42,10 @@ public class CustomPrimitiveTypeItemSemanticEditPolicyCN extends PrimitiveTypeIt
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -74,10 +75,10 @@ public class CustomPrimitiveTypeItemSemanticEditPolicyCN extends PrimitiveTypeIt
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_4017 == req.getElementType()) {
- return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new CAssociationClassCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
index 9a4b862eb6c..ab878b614d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CTemplateBindingCreateCommand;
@@ -40,7 +41,7 @@ public class CustomSignalItemSemanticEditPolicy extends SignalItemSemanticEditPo
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -70,7 +71,7 @@ public class CustomSignalItemSemanticEditPolicy extends SignalItemSemanticEditPo
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
index 28073ee8d28..2050cee7f22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/itemsemantic/CustomSignalItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.BranchDependenctReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationReorientCommand;
import org.eclipse.papyrus.uml.diagram.clazz.custom.command.CTemplateBindingCreateCommand;
@@ -40,7 +41,7 @@ public class CustomSignalItemSemanticEditPolicyCN extends SignalItemSemanticEdit
*/
protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateBinding_4015 == req.getElementType()) {
return getGEFWrapper(new CTemplateBindingCreateCommand(req, req.getSource(), req.getTarget()));
@@ -70,7 +71,7 @@ public class CustomSignalItemSemanticEditPolicyCN extends SignalItemSemanticEdit
*/
protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
if(UMLElementTypes.Association_4001 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.clazz.custom.command.CAssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
//forbid creation of association branch from it.
if(UMLElementTypes.Association_4019 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
index b4af1a27da0..9c22ac68858 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/plugin.xml
@@ -1432,62 +1432,7 @@
</command>
</extension>
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand"
- icon="icons/obj16/Diagram_Class.gif"
- label="Create a new Class Diagram"
- style="push"
- tooltip="Create a new Class Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand"
- icon="icons/obj16/Diagram_Class.gif"
- label="Create a new Class Diagram"
- style="push"
- tooltip="Create a new Class Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand"
- icon="icons/obj16/Diagram_Class.gif"
- label="Create a new Class Diagram"
- style="push"
- tooltip="Create a new Class Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-</extension>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationClassCreateCommand.java
index 4bd8b570edc..fa27a1de6c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.AssociationClass;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class AssociationClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class AssociationClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AssociationClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AssociationClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AssociationClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AssociationClassCreateCommand(req, eObject);
+ public static AssociationClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AssociationClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AssociationClassCreateCommand(CreateElementRequest req) {
+ public AssociationClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class AssociationClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAssociationClass());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class AssociationClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
AssociationClass newElement = UMLFactory.eINSTANCE.createAssociationClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_AssociationClass_2013(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationNodeCreateCommand.java
index f451b5f12bf..575260fd933 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/AssociationNodeCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AssociationNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AssociationNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AssociationNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AssociationNodeCreateCommand(req, eObject);
+ public static AssociationNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AssociationNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AssociationNodeCreateCommand(CreateElementRequest req) {
+ public AssociationNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAssociation());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Association newElement = UMLFactory.eINSTANCE.createAssociation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommand.java
index 0d7918a67eb..6115df7cf86 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ClassCreateCommand(req, eObject);
+ public static ClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassCreateCommand(CreateElementRequest req) {
+ public ClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +94,9 @@ public class ClassCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -98,8 +105,19 @@ public class ClassCreateCommand extends EditElementCommand {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_2008(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommandCN.java
index a60ac83efa1..ab4348a84f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ClassCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ClassCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ClassCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ClassCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ClassCreateCommandCN(req, eObject);
+ public static ClassCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassCreateCommandCN(CreateElementRequest req) {
+ public ClassCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ClassCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ClassCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3010(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassifierTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassifierTemplateParameterCreateCommand.java
index 17ba46ea45d..63b7feb1c59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassifierTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ClassifierTemplateParameterCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.ClassifierTemplateParameter;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class ClassifierTemplateParameterCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class ClassifierTemplateParameterCreateCommand extends EditElementCommand
/**
* @generated
*/
- public ClassifierTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ClassifierTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassifierTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ClassifierTemplateParameterCreateCommand(req, eObject);
+ public static ClassifierTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassifierTemplateParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassifierTemplateParameterCreateCommand(CreateElementRequest req) {
+ public ClassifierTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class ClassifierTemplateParameterCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClassifierTemplateParameter());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class ClassifierTemplateParameterCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ClassifierTemplateParameter newElement = UMLFactory.eINSTANCE.createClassifierTemplateParameter();
- TemplateSignature owner = (TemplateSignature)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateSignature qualifiedTarget = (TemplateSignature)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
TemplateSignature childHolder = (TemplateSignature)getElementToEdit();
childHolder.getParameters().add(newElement);
doConfigure(newElement, monitor, info);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommand.java
index 3581b940740..355c692104b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_2012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommandCN.java
index 7cf95027d11..7874e985aa9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/CommentCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class CommentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3028(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommand.java
index f76b1895903..532775c3f88 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ComponentCreateCommand(req, eObject);
+ public static ComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCreateCommand(CreateElementRequest req) {
+ public ComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_2002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommandCN.java
index 5e342190373..9ff92878230 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ComponentCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ComponentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ComponentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ComponentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ComponentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ComponentCreateCommandCN(req, eObject);
+ public static ComponentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCreateCommandCN(CreateElementRequest req) {
+ public ComponentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ComponentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ComponentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3021(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConnectableElementTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConnectableElementTemplateParameterCreateCommand.java
index d9d8d4b8a73..f1e500a8cdb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConnectableElementTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConnectableElementTemplateParameterCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.ConnectableElementTemplateParameter;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class ConnectableElementTemplateParameterCreateCommand extends EditElemen
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class ConnectableElementTemplateParameterCreateCommand extends EditElemen
/**
* @generated
*/
- public ConnectableElementTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConnectableElementTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConnectableElementTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConnectableElementTemplateParameterCreateCommand(req, eObject);
+ public static ConnectableElementTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConnectableElementTemplateParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConnectableElementTemplateParameterCreateCommand(CreateElementRequest req) {
+ public ConnectableElementTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class ConnectableElementTemplateParameterCreateCommand extends EditElemen
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConnectableElementTemplateParameter());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class ConnectableElementTemplateParameterCreateCommand extends EditElemen
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ConnectableElementTemplateParameter newElement = UMLFactory.eINSTANCE.createConnectableElementTemplateParameter();
- TemplateSignature owner = (TemplateSignature)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateSignature qualifiedTarget = (TemplateSignature)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
TemplateSignature childHolder = (TemplateSignature)getElementToEdit();
childHolder.getParameters().add(newElement);
doConfigure(newElement, monitor, info);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommand.java
index f2cbcc1abbb..6ba672ea76d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_2011(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommandCN.java
index cc8bc42caa4..b87b333325d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ConstraintCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3029(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ContextLinkCreateCommand.java
index 0b1df614131..e50bb3b50e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ContextLinkCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ContextLinkCreateCommand.java
@@ -64,7 +64,7 @@ public class ContextLinkCreateCommand extends EditElementCommand {
return true; // link creation is in progress; source is not defined yet
}
// target may be null here but it's possible to check constraint
- return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintContext_8500(getSource(), resolveTargetNamespace());
+ return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateConstraintContext_8500(getSource(), getTarget());
}
/**
@@ -74,8 +74,8 @@ public class ContextLinkCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
- if(getSource() != null && resolveTargetNamespace() != null) {
- getSource().setContext(resolveTargetNamespace());
+ if(getSource() != null && getTarget() != null) {
+ getSource().setContext(getTarget());
}
return CommandResult.newOKCommandResult();
}
@@ -97,7 +97,7 @@ public class ContextLinkCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected Namespace resolveTargetNamespace() {
+ protected Namespace getTarget() {
return (Namespace)target;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommand.java
index 55f170b5fa8..c2827a7ba67 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommand(req, eObject);
+ public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req) {
+ public DataTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class DataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class DataTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_2010(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommandCN.java
index e6e2d063c4b..e8e37857a68 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DataTypeCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommandCN(req, eObject);
+ public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3027(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DefaultNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DefaultNamedElementCreateCommand.java
index f374a134c86..32524caf37d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DefaultNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DefaultNamedElementCreateCommand.java
@@ -23,8 +23,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DefaultNamedElementCreateCommand(req, eObject);
+ public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DefaultNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -84,7 +89,9 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DependencyNodeCreateCommand.java
index 09de634724b..f46d7e4e4f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DependencyNodeCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DependencyNodeCreateCommand(req, eObject);
+ public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DependencyNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DurationObservationCreateCommand.java
index 8695585f551..6a9fbc5ca99 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/DurationObservationCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationObservationCreateCommand(req, eObject);
+ public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req) {
+ public DurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class DurationObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class DurationObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationObservation_2095(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommand.java
index 9d34cde2b3d..9ea74d20f9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommand(req, eObject);
+ public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req) {
+ public EnumerationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class EnumerationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class EnumerationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_2006(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommandCN.java
index d07ff1aff01..e591d1b290c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommandCN(req, eObject);
+ public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3025(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationLiteralCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationLiteralCreateCommand.java
index 8e51364a67d..17e511ab750 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationLiteralCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/EnumerationLiteralCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EnumerationLiteralCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EnumerationLiteralCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationLiteralCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EnumerationLiteralCreateCommand(req, eObject);
+ public static EnumerationLiteralCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationLiteralCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationLiteralCreateCommand(CreateElementRequest req) {
+ public EnumerationLiteralCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
- Enumeration owner = (Enumeration)getElementToEdit();
- owner.getOwnedLiterals().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Enumeration qualifiedTarget = (Enumeration)target;
+ qualifiedTarget.getOwnedLiterals().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_EnumerationLiteral_3017(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommand.java
index c318d894431..e4033a65a5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InformationItemCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InformationItemCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InformationItemCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InformationItemCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InformationItemCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InformationItemCreateCommand(req, eObject);
+ public static InformationItemCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InformationItemCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InformationItemCreateCommand(CreateElementRequest req) {
+ public InformationItemCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InformationItemCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InformationItemCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InformationItem_2099(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommandCN.java
index 5453abbd3e2..2067544d83c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InformationItemCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InformationItemCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InformationItemCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InformationItemCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InformationItemCreateCommandCN(req, eObject);
+ public static InformationItemCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InformationItemCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InformationItemCreateCommandCN(CreateElementRequest req) {
+ public InformationItemCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InformationItem_3040(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommand.java
index 4e5da74c62f..554d16664ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InstanceSpecificationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InstanceSpecificationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InstanceSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InstanceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InstanceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InstanceSpecificationCreateCommand(req, eObject);
+ public static InstanceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InstanceSpecificationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InstanceSpecificationCreateCommand(CreateElementRequest req) {
+ public InstanceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InstanceSpecificationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInstanceSpecification());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class InstanceSpecificationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InstanceSpecification newElement = UMLFactory.eINSTANCE.createInstanceSpecification();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InstanceSpecification_2001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommandCN.java
index 5bbed61c016..4348bb9c886 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InstanceSpecificationCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InstanceSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InstanceSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InstanceSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InstanceSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InstanceSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InstanceSpecificationCreateCommandCN(req, eObject);
+ public static InstanceSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InstanceSpecificationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InstanceSpecificationCreateCommandCN(CreateElementRequest req) {
+ public InstanceSpecificationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InstanceSpecificationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInstanceSpecification());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class InstanceSpecificationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InstanceSpecification newElement = UMLFactory.eINSTANCE.createInstanceSpecification();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InstanceSpecification_3020(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommand.java
index 06b1c40dc05..ad3f5a8af64 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommand(req, eObject);
+ public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req) {
+ public InterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class InterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_2004(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommandCN.java
index 2ea35d9bb7b..d875e29ebf6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/InterfaceCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommandCN(req, eObject);
+ public static InterfaceCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommandCN(CreateElementRequest req) {
+ public InterfaceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3023(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandCN.java
index e19bc368683..a030f078497 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandCN(req, eObject);
+ public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req) {
+ public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ModelCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_3024(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandTN.java
index 4af65fe353a..b0ff286e54d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ModelCreateCommandTN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandTN(req, eObject);
+ public static ModelCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandTN(CreateElementRequest req) {
+ public ModelCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ModelCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ModelCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_2005(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForClassCreateCommand.java
index 66702b02b31..063eca2d454 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForClassCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class NestedClassForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class NestedClassForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedClassForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedClassForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedClassForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedClassForClassCreateCommand(req, eObject);
+ public static NestedClassForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedClassForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedClassForClassCreateCommand(CreateElementRequest req) {
+ public NestedClassForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class NestedClassForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class NestedClassForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3014(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForComponentCreateCommand.java
index 2960f50eb37..1452be479db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForComponentCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class NestedClassForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class NestedClassForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedClassForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedClassForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedClassForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedClassForComponentCreateCommand(req, eObject);
+ public static NestedClassForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedClassForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedClassForComponentCreateCommand(CreateElementRequest req) {
+ public NestedClassForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class NestedClassForComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class NestedClassForComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3004(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForInterfaceCreateCommand.java
index e5fe1bf2560..974f933ba07 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedClassForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedClassForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedClassForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedClassForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedClassForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedClassForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedClassForInterfaceCreateCommand(req, eObject);
+ public static NestedClassForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedClassForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedClassForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedClassForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedClassForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedClassForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3008(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForClassCreateCommand.java
index 92da46c021c..b87274b3f22 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedDataTypeForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedDataTypeForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedDataTypeForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedDataTypeForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedDataTypeForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedDataTypeForClassCreateCommand(req, eObject);
+ public static NestedDataTypeForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedDataTypeForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedDataTypeForClassCreateCommand(CreateElementRequest req) {
+ public NestedDataTypeForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedDataTypeForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedDataTypeForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3044(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForComponentCreateCommand.java
index b0956866774..4c97e4045fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedDataTypeForComponentCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedDataTypeForComponentCreateCommand extends EditElementCommand
/**
* @generated
*/
- public NestedDataTypeForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedDataTypeForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedDataTypeForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedDataTypeForComponentCreateCommand(req, eObject);
+ public static NestedDataTypeForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedDataTypeForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedDataTypeForComponentCreateCommand(CreateElementRequest req) {
+ public NestedDataTypeForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedDataTypeForComponentCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedDataTypeForComponentCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3045(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForInterfaceCreateCommand.java
index 73d631eb9f3..1e6710dc18b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedDataTypeForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedDataTypeForInterfaceCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedDataTypeForInterfaceCreateCommand extends EditElementCommand
/**
* @generated
*/
- public NestedDataTypeForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedDataTypeForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedDataTypeForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedDataTypeForInterfaceCreateCommand(req, eObject);
+ public static NestedDataTypeForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedDataTypeForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedDataTypeForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedDataTypeForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedDataTypeForInterfaceCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedDataTypeForInterfaceCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3043(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForClassCreateCommand.java
index ba6430c9020..65169b46a07 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedEnumerationForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedEnumerationForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedEnumerationForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedEnumerationForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedEnumerationForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedEnumerationForClassCreateCommand(req, eObject);
+ public static NestedEnumerationForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedEnumerationForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedEnumerationForClassCreateCommand(CreateElementRequest req) {
+ public NestedEnumerationForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedEnumerationForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedEnumerationForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3052(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForComponentCreateCommand.java
index 81f76a19bc4..35ce57c1c75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedEnumerationForComponentCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedEnumerationForComponentCreateCommand extends EditElementComma
/**
* @generated
*/
- public NestedEnumerationForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedEnumerationForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedEnumerationForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedEnumerationForComponentCreateCommand(req, eObject);
+ public static NestedEnumerationForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedEnumerationForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedEnumerationForComponentCreateCommand(CreateElementRequest req) {
+ public NestedEnumerationForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedEnumerationForComponentCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedEnumerationForComponentCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3053(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForInterfaceCreateCommand.java
index 6753552c9fc..9724fde32c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedEnumerationForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedEnumerationForInterfaceCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedEnumerationForInterfaceCreateCommand extends EditElementComma
/**
* @generated
*/
- public NestedEnumerationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedEnumerationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedEnumerationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedEnumerationForInterfaceCreateCommand(req, eObject);
+ public static NestedEnumerationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedEnumerationForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedEnumerationForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedEnumerationForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedEnumerationForInterfaceCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedEnumerationForInterfaceCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3054(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForClassCreateCommand.java
index 995fd9078ae..02085840031 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForClassCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class NestedInterfaceForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class NestedInterfaceForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedInterfaceForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedInterfaceForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedInterfaceForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedInterfaceForClassCreateCommand(req, eObject);
+ public static NestedInterfaceForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedInterfaceForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedInterfaceForClassCreateCommand(CreateElementRequest req) {
+ public NestedInterfaceForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class NestedInterfaceForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class NestedInterfaceForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3036(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForComponentCreateCommand.java
index 5f7dcc6719c..389713a03ae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForComponentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class NestedInterfaceForComponentCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class NestedInterfaceForComponentCreateCommand extends EditElementCommand
/**
* @generated
*/
- public NestedInterfaceForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedInterfaceForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedInterfaceForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedInterfaceForComponentCreateCommand(req, eObject);
+ public static NestedInterfaceForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedInterfaceForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedInterfaceForComponentCreateCommand(CreateElementRequest req) {
+ public NestedInterfaceForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class NestedInterfaceForComponentCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class NestedInterfaceForComponentCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3037(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForInterfaceCreateCommand.java
index 43716adac36..3dd63c29f90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedInterfaceForInterfaceCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedInterfaceForInterfaceCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedInterfaceForInterfaceCreateCommand extends EditElementCommand
/**
* @generated
*/
- public NestedInterfaceForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedInterfaceForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedInterfaceForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedInterfaceForInterfaceCreateCommand(req, eObject);
+ public static NestedInterfaceForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedInterfaceForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedInterfaceForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedInterfaceForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedInterfaceForInterfaceCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedInterfaceForInterfaceCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3038(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForClassCreateCommand.java
index 1c4f3114067..b14d00edefb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedPrimitiveTypeForClassCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedPrimitiveTypeForClassCreateCommand extends EditElementCommand
/**
* @generated
*/
- public NestedPrimitiveTypeForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedPrimitiveTypeForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedPrimitiveTypeForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedPrimitiveTypeForClassCreateCommand(req, eObject);
+ public static NestedPrimitiveTypeForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedPrimitiveTypeForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedPrimitiveTypeForClassCreateCommand(CreateElementRequest req) {
+ public NestedPrimitiveTypeForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedPrimitiveTypeForClassCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedPrimitiveTypeForClassCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3047(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForComponentCreateCommand.java
index 71b7b616189..329687ccca3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedPrimitiveTypeForComponentCreateCommand extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedPrimitiveTypeForComponentCreateCommand extends EditElementCom
/**
* @generated
*/
- public NestedPrimitiveTypeForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedPrimitiveTypeForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedPrimitiveTypeForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedPrimitiveTypeForComponentCreateCommand(req, eObject);
+ public static NestedPrimitiveTypeForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedPrimitiveTypeForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedPrimitiveTypeForComponentCreateCommand(CreateElementRequest req) {
+ public NestedPrimitiveTypeForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedPrimitiveTypeForComponentCreateCommand extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedPrimitiveTypeForComponentCreateCommand extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3046(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForInterfaceCreateCommand.java
index d34823e9835..626dc81a467 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedPrimitiveTypeForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedPrimitiveTypeForInterfaceCreateCommand extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedPrimitiveTypeForInterfaceCreateCommand extends EditElementCom
/**
* @generated
*/
- public NestedPrimitiveTypeForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedPrimitiveTypeForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedPrimitiveTypeForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedPrimitiveTypeForInterfaceCreateCommand(req, eObject);
+ public static NestedPrimitiveTypeForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedPrimitiveTypeForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedPrimitiveTypeForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedPrimitiveTypeForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedPrimitiveTypeForInterfaceCreateCommand extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedPrimitiveTypeForInterfaceCreateCommand extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3048(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForClassCreateCommand.java
index 74f38b67401..9597596888c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedSignalForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedSignalForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedSignalForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedSignalForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedSignalForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedSignalForClassCreateCommand(req, eObject);
+ public static NestedSignalForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedSignalForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedSignalForClassCreateCommand(CreateElementRequest req) {
+ public NestedSignalForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedSignalForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedSignalForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_3050(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForComponentCreateCommand.java
index 3dfbec53c6d..31dacf89bee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedSignalForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedSignalForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedSignalForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedSignalForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedSignalForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedSignalForComponentCreateCommand(req, eObject);
+ public static NestedSignalForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedSignalForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedSignalForComponentCreateCommand(CreateElementRequest req) {
+ public NestedSignalForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedSignalForComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedSignalForComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_3051(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForInterfaceCreateCommand.java
index bc9c70aebac..7075db8b966 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/NestedSignalForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedSignalForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedSignalForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NestedSignalForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NestedSignalForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedSignalForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NestedSignalForInterfaceCreateCommand(req, eObject);
+ public static NestedSignalForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedSignalForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedSignalForInterfaceCreateCommand(CreateElementRequest req) {
+ public NestedSignalForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class NestedSignalForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class NestedSignalForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Interface owner = (Interface)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_3049(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForClassCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForClassCommand.java
index b50cab3d1fd..3d6f96db973 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForClassCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForClassCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class OperationForClassCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class OperationForClassCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForClassCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForClassCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForClassCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForClassCommand(req, eObject);
+ public static OperationForClassCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForClassCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForClassCommand(CreateElementRequest req) {
+ public OperationForClassCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class OperationForClassCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class OperationForClassCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3013(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForComponentCreateCommand.java
index 8f6d4f415cf..872ca1f17e8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class OperationForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class OperationForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForComponentCreateCommand(req, eObject);
+ public static OperationForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForComponentCreateCommand(CreateElementRequest req) {
+ public OperationForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class OperationForComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class OperationForComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3003(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForDataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForDataTypeCreateCommand.java
index e26cbfa7d54..3fc81d121db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForDataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForDataTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class OperationForDataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class OperationForDataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForDataTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForDataTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForDataTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForDataTypeCreateCommand(req, eObject);
+ public static OperationForDataTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForDataTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForDataTypeCreateCommand(CreateElementRequest req) {
+ public OperationForDataTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class OperationForDataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class OperationForDataTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3019(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForInterfaceCreateCommand.java
index b6a626581a9..93e9e03ce5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForInterfaceCreateCommand(req, eObject);
+ public static OperationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForInterfaceCreateCommand(CreateElementRequest req) {
+ public OperationForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForPrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForPrimitiveTypeCreateCommand.java
index 56c7c98c882..7e8744bcdab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForPrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationForPrimitiveTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class OperationForPrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class OperationForPrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForPrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForPrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForPrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForPrimitiveTypeCreateCommand(req, eObject);
+ public static OperationForPrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForPrimitiveTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForPrimitiveTypeCreateCommand(CreateElementRequest req) {
+ public OperationForPrimitiveTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class OperationForPrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class OperationForPrimitiveTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3042(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationTemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationTemplateParameterCreateCommand.java
index ee59e23532f..66e5de5a7a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationTemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/OperationTemplateParameterCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.OperationTemplateParameter;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class OperationTemplateParameterCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class OperationTemplateParameterCreateCommand extends EditElementCommand
/**
* @generated
*/
- public OperationTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationTemplateParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationTemplateParameterCreateCommand(req, eObject);
+ public static OperationTemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationTemplateParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationTemplateParameterCreateCommand(CreateElementRequest req) {
+ public OperationTemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class OperationTemplateParameterCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperationTemplateParameter());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class OperationTemplateParameterCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OperationTemplateParameter newElement = UMLFactory.eINSTANCE.createOperationTemplateParameter();
- TemplateSignature owner = (TemplateSignature)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateSignature qualifiedTarget = (TemplateSignature)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
TemplateSignature childHolder = (TemplateSignature)getElementToEdit();
childHolder.getParameters().add(newElement);
doConfigure(newElement, monitor, info);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommand.java
index 89974d7063f..f6f46a38bda 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommand(req, eObject);
+ public static PackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req) {
+ public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class PackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_2007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommandCN.java
index 0aeff043a6b..7f797e963ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PackageCreateCommandCN.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandCN(req, eObject);
+ public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req) {
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class PackageCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_3009(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommand.java
index 3c587e14baf..8b60d789259 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommand(req, eObject);
+ public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_2009(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommandCN.java
index e996a0e2b72..8c383195adc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PrimitiveTypeCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommandCN(req, eObject);
+ public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3026(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForClassCreateCommand.java
index 2c94b1f3ddc..a6bf0571f21 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForClassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForClassCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyForClassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyForClassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyForClassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyForClassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyForClassCreateCommand(req, eObject);
+ public static PropertyForClassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyForClassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyForClassCreateCommand(CreateElementRequest req) {
+ public PropertyForClassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyForClassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyForClassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
index c13b0d45e62..bcc518667ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyForComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyForComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyForComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyForComponentCreateCommand(req, eObject);
+ public static PropertyForComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyForComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyForComponentCreateCommand(CreateElementRequest req) {
+ public PropertyForComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyForComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForInterfaceCreateCommand.java
index 61e3a166994..1ba032b1f3a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyForInterfaceCreateCommand(req, eObject);
+ public static PropertyForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyForInterfaceCreateCommand(CreateElementRequest req) {
+ public PropertyForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3006(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForSignalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForSignalCreateCommand.java
index f1ec6a0786a..e85d3feb10b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForSignalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyForSignalCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyForSignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyForSignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyForSignalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyForSignalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyForSignalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyForSignalCreateCommand(req, eObject);
+ public static PropertyForSignalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyForSignalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyForSignalCreateCommand(CreateElementRequest req) {
+ public PropertyForSignalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyForSignalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyForSignalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- Signal owner = (Signal)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Signal qualifiedTarget = (Signal)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3005(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforDataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforDataTypeCreateCommand.java
index b515dc78a7c..553b4a4895c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforDataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforDataTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyforDataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyforDataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyforDataTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyforDataTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyforDataTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyforDataTypeCreateCommand(req, eObject);
+ public static PropertyforDataTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyforDataTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyforDataTypeCreateCommand(CreateElementRequest req) {
+ public PropertyforDataTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyforDataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyforDataTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforPrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforPrimitiveTypeCreateCommand.java
index 32d2c27e14a..1b163f0ab9c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforPrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/PropertyforPrimitiveTypeCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PropertyforPrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PropertyforPrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyforPrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyforPrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyforPrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyforPrimitiveTypeCreateCommand(req, eObject);
+ public static PropertyforPrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyforPrimitiveTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyforPrimitiveTypeCreateCommand(CreateElementRequest req) {
+ public PropertyforPrimitiveTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PropertyforPrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PropertyforPrimitiveTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3041(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionCreateCommand.java
index 5a61dfe48b7..f9eec818cae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ReceptionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ReceptionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReceptionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReceptionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReceptionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReceptionCreateCommand(req, eObject);
+ public static ReceptionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReceptionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReceptionCreateCommand(CreateElementRequest req) {
+ public ReceptionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ReceptionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReception());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ReceptionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Reception newElement = UMLFactory.eINSTANCE.createReception();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedReceptions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedReceptions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Reception_3011(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionInInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionInInterfaceCreateCommand.java
index 4d125329092..cba81547650 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionInInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ReceptionInInterfaceCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReceptionInInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReceptionInInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReceptionInInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReceptionInInterfaceCreateCommand(req, eObject);
+ public static ReceptionInInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReceptionInInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReceptionInInterfaceCreateCommand(CreateElementRequest req) {
+ public ReceptionInInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReception());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Reception newElement = UMLFactory.eINSTANCE.createReception();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedReceptions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedReceptions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Reception_3039(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/RedefinableTemplateSignatureCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/RedefinableTemplateSignatureCreateCommand.java
index 3f53d8f5840..1f9730f91f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/RedefinableTemplateSignatureCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/RedefinableTemplateSignatureCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.RedefinableTemplateSignature;
import org.eclipse.uml2.uml.TemplateableElement;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class RedefinableTemplateSignatureCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class RedefinableTemplateSignatureCreateCommand extends EditElementComman
/**
* @generated
*/
- public RedefinableTemplateSignatureCreateCommand(CreateElementRequest req, EObject eObject) {
+ public RedefinableTemplateSignatureCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static RedefinableTemplateSignatureCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new RedefinableTemplateSignatureCreateCommand(req, eObject);
+ public static RedefinableTemplateSignatureCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new RedefinableTemplateSignatureCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public RedefinableTemplateSignatureCreateCommand(CreateElementRequest req) {
+ public RedefinableTemplateSignatureCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -91,7 +96,9 @@ public class RedefinableTemplateSignatureCreateCommand extends EditElementComman
if(container.getOwnedTemplateSignature() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getRedefinableTemplateSignature());
+ return data.isPermitted();
}
/**
@@ -99,8 +106,19 @@ public class RedefinableTemplateSignatureCreateCommand extends EditElementComman
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
RedefinableTemplateSignature newElement = UMLFactory.eINSTANCE.createRedefinableTemplateSignature();
- TemplateableElement owner = (TemplateableElement)getElementToEdit();
- owner.setOwnedTemplateSignature(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateableElement qualifiedTarget = (TemplateableElement)target;
+ qualifiedTarget.setOwnedTemplateSignature(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_RedefinableTemplateSignature_3015(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShapeNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShapeNamedElementCreateCommand.java
index 8274cb84dc1..cd538de51d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShapeNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShapeNamedElementCreateCommand.java
@@ -23,8 +23,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShapeNamedElementCreateCommand(req, eObject);
+ public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShapeNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -84,7 +89,9 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
index 271a8c4d117..aaeb69e43d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/ShortCutDiagramCreateCommand.java
@@ -36,7 +36,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +46,25 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShortCutDiagramCreateCommand(req, eObject);
+ public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShortCutDiagramCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommand.java
index 2c19339ca2b..ea6c4f68b2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class SignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class SignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SignalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SignalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SignalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SignalCreateCommand(req, eObject);
+ public static SignalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SignalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SignalCreateCommand(CreateElementRequest req) {
+ public SignalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class SignalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class SignalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_2003(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommandCN.java
index 13c6fb3e733..f518c73f6e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SignalCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class SignalCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class SignalCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public SignalCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public SignalCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SignalCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new SignalCreateCommandCN(req, eObject);
+ public static SignalCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SignalCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public SignalCreateCommandCN(CreateElementRequest req) {
+ public SignalCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class SignalCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class SignalCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_3022(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SlotCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SlotCreateCommand.java
index 069cecf226c..078047f8362 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SlotCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/SlotCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Slot;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class SlotCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class SlotCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SlotCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SlotCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SlotCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SlotCreateCommand(req, eObject);
+ public static SlotCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SlotCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SlotCreateCommand(CreateElementRequest req) {
+ public SlotCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class SlotCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSlot());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class SlotCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Slot newElement = UMLFactory.eINSTANCE.createSlot();
- InstanceSpecification owner = (InstanceSpecification)getElementToEdit();
- owner.getSlots().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InstanceSpecification qualifiedTarget = (InstanceSpecification)target;
+ qualifiedTarget.getSlots().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateParameterCreateCommand.java
index e14c8296b83..186daffe494 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateParameterCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.TemplateParameter;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class TemplateParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class TemplateParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TemplateParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TemplateParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TemplateParameterCreateCommand(req, eObject);
+ public static TemplateParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TemplateParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TemplateParameterCreateCommand(CreateElementRequest req) {
+ public TemplateParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class TemplateParameterCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTemplateParameter());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class TemplateParameterCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TemplateParameter newElement = UMLFactory.eINSTANCE.createTemplateParameter();
- TemplateSignature owner = (TemplateSignature)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateSignature qualifiedTarget = (TemplateSignature)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
TemplateSignature childHolder = (TemplateSignature)getElementToEdit();
childHolder.getParameters().add(newElement);
doConfigure(newElement, monitor, info);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateSignatureCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateSignatureCreateCommand.java
index 29e4b5f710d..9515c23c080 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateSignatureCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TemplateSignatureCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.TemplateableElement;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class TemplateSignatureCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class TemplateSignatureCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TemplateSignatureCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TemplateSignatureCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TemplateSignatureCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TemplateSignatureCreateCommand(req, eObject);
+ public static TemplateSignatureCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TemplateSignatureCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TemplateSignatureCreateCommand(CreateElementRequest req) {
+ public TemplateSignatureCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +95,9 @@ public class TemplateSignatureCreateCommand extends EditElementCommand {
if(container.getOwnedTemplateSignature() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTemplateSignature());
+ return data.isPermitted();
}
/**
@@ -98,8 +105,19 @@ public class TemplateSignatureCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TemplateSignature newElement = UMLFactory.eINSTANCE.createTemplateSignature();
- TemplateableElement owner = (TemplateableElement)getElementToEdit();
- owner.setOwnedTemplateSignature(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ TemplateableElement qualifiedTarget = (TemplateableElement)target;
+ qualifiedTarget.setOwnedTemplateSignature(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TimeObservationCreateCommand.java
index 0518477262a..f57d996ff8c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TimeObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/commands/TimeObservationCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeObservation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeObservationCreateCommand(req, eObject);
+ public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req) {
+ public TimeObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class TimeObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class TimeObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeObservation_2096(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassAttributeCompartmentItemSemanticEditPolicy.java
index f22685cf835..00ea7dc0b55 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class AssociationClassAttributeCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForComponentCreateCommand(req));
+ return getGEFWrapper(new PropertyForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy.java
index e08d4de903b..bc3f014a9fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class AssociationClassNestedClassifierCompartmentItemSemanticEditPolicy e
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedClassForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassOperationCompartmentItemSemanticEditPolicy.java
index 03959c06f84..a9d9f578882 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/AssociationClassOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class AssociationClassOperationCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForComponentCreateCommand(req));
+ return getGEFWrapper(new OperationForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java
index 941c93edb25..45344cea235 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class ClassAttributeCompartmentItemSemanticEditPolicy extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForClassCreateCommand(req));
+ return getGEFWrapper(new PropertyForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java
index edb2c710e47..1f7b3058b7c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class ClassAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseIt
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForClassCreateCommand(req));
+ return getGEFWrapper(new PropertyForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicy.java
index edd1ed2eadf..b7a41890028 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class ClassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicyCN.java
index b081119e1ad..0cbbcc460db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class ClassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicy.java
index decc08430b0..74ef441fbbe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForClassCreateCommand;
@@ -61,37 +62,37 @@ public class ClassNestedClassifierCompartmentItemSemanticEditPolicy extends UMLB
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForClassCreateCommand(req));
+ return getGEFWrapper(new NestedClassForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3036 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForClassCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3052 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForClassCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3047 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForClassCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3044 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForClassCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3050 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForClassCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicyCN.java
index c93267f89b6..d60c19f11ca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassNestedClassifierCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForClassCreateCommand;
@@ -61,37 +62,37 @@ public class ClassNestedClassifierCompartmentItemSemanticEditPolicyCN extends UM
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForClassCreateCommand(req));
+ return getGEFWrapper(new NestedClassForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3036 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForClassCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3052 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForClassCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3047 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForClassCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3044 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForClassCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3050 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForClassCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java
index d7e98c25ac6..5d65414905c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForClassCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class ClassOperationCompartmentItemSemanticEditPolicy extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionCreateCommand(req));
+ return getGEFWrapper(new ReceptionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Operation_3013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForClassCommand(req));
+ return getGEFWrapper(new OperationForClassCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java
index 437e8d2af44..1bd93f58518 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForClassCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class ClassOperationCompartmentItemSemanticEditPolicyCN extends UMLBaseIt
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionCreateCommand(req));
+ return getGEFWrapper(new ReceptionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Operation_3013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForClassCommand(req));
+ return getGEFWrapper(new OperationForClassCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicy.java
index 18042485a75..89c3b2477de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class ComponentAttributeCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForComponentCreateCommand(req));
+ return getGEFWrapper(new PropertyForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicyCN.java
index c857808dd13..66ebc29c040 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class ComponentAttributeCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForComponentCreateCommand(req));
+ return getGEFWrapper(new PropertyForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicy.java
index 87f76653b01..367d38a5a8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class ComponentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicyCN.java
index 0e1f4bdbd1a..137abdb2518 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class ComponentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicy.java
index da516aaae42..e6144568bcc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForComponentCreateCommand;
@@ -61,37 +62,37 @@ public class ComponentNestedClassifierCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedClassForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3037 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3053 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3046 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3045 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3051 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN.java
index 3d22e9f66f7..ee24820f6ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForComponentCreateCommand;
@@ -61,37 +62,37 @@ public class ComponentNestedClassifierCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedClassForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3037 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3053 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3046 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3045 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3051 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForComponentCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicy.java
index dae64dc968a..f5be5eed351 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class ComponentOperationCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForComponentCreateCommand(req));
+ return getGEFWrapper(new OperationForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_3011 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionCreateCommand(req));
+ return getGEFWrapper(new ReceptionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicyCN.java
index 298dc71b44d..40dc2e8cac7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ComponentOperationCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class ComponentOperationCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForComponentCreateCommand(req));
+ return getGEFWrapper(new OperationForComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_3011 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionCreateCommand(req));
+ return getGEFWrapper(new ReceptionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
index a7dd04756b7..0105d3b0697 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyforDataTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyforDataTypeCreateCommand(req));
+ return getGEFWrapper(new PropertyforDataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index 0ec3e4a193c..79d42bbab33 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyforDataTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyforDataTypeCreateCommand(req));
+ return getGEFWrapper(new PropertyforDataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicy.java
index 849fea5badd..337c0a07e09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -122,7 +123,7 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicyCN.java
index 56e86a24d46..eea8245801f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -122,7 +123,7 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
index 17da8caddd1..96cc79c6ce8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForDataTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForDataTypeCreateCommand(req));
+ return getGEFWrapper(new OperationForDataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 0aaeb4352ae..e2d80c35ba5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForDataTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForDataTypeCreateCommand(req));
+ return getGEFWrapper(new OperationForDataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
index 0922a736849..55b1f16ae24 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.EnumerationLiteralCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommand(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
index 8723e3a8dde..a6493e27752 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.EnumerationLiteralCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommand(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicy.java
index b31cb769462..73ca818bc79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.SlotCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class InstanceSpecificationSlotCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SlotCreateCommand(req));
+ return getGEFWrapper(new SlotCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN.java
index 16e965be9ab..bfcaff89ed3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.SlotCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class InstanceSpecificationSlotCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SlotCreateCommand(req));
+ return getGEFWrapper(new SlotCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
index 39fcb62210a..f9400890339 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class InterfaceAttributeCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req));
+ return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
index 5b2e8917db6..2a9d8415de0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class InterfaceAttributeCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req));
+ return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicy.java
index 6e556db30e1..3b39d616d4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class InterfaceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicyCN.java
index 2465baf67e8..e71007ad892 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -125,7 +126,7 @@ public class InterfaceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java
index 566b16eb201..2d212119c6a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForInterfaceCreateCommand;
@@ -61,37 +62,37 @@ public class InterfaceNestedClassifierCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3038 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3054 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3048 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3043 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3049 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java
index e4fcbce739a..9d9c56ffef6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedClassForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedDataTypeForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.NestedEnumerationForInterfaceCreateCommand;
@@ -61,37 +62,37 @@ public class InterfaceNestedClassifierCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedClassForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3038 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedInterfaceForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3054 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedEnumerationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3048 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedPrimitiveTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3043 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedDataTypeForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3049 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req));
+ return getGEFWrapper(new NestedSignalForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
index 5d1a34d59fa..3345e67fba3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionInInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class InterfaceOperationCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_3039 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req));
+ return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
index 7a3d38c7643..f5f4df66838 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ReceptionInInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -57,13 +58,13 @@ public class InterfaceOperationCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_3039 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req));
+ return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicy.java
index c0758c76a97..64c3233720b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicy.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AssociationClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AssociationNodeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassCreateCommand;
@@ -81,127 +82,127 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DependencyNodeCreateCommand(req));
+ return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AssociationClass_2013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationClassCreateCommand(req));
+ return getGEFWrapper(new AssociationClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Association_2015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationNodeCreateCommand(req));
+ return getGEFWrapper(new AssociationNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InstanceSpecification_2001 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceSpecificationCreateCommand(req));
+ return getGEFWrapper(new InstanceSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_2002 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommand(req));
+ return getGEFWrapper(new ComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_2003 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommand(req));
+ return getGEFWrapper(new SignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_2004 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_2005 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandTN(req));
+ return getGEFWrapper(new ModelCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_2006 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommand(req));
+ return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_2007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommand(req));
+ return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_2099 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommand(req));
+ return getGEFWrapper(new InformationItemCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_2008 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCreateCommand(req));
+ return getGEFWrapper(new ClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_2009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_2010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommand(req));
+ return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_2011 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_2012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Diagram_2016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShortCutDiagramCreateCommand(req));
+ return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_2095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommand(req));
+ return getGEFWrapper(new DurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_2096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DefaultNamedElementCreateCommand(req));
+ return getGEFWrapper(new DefaultNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2098 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShapeNamedElementCreateCommand(req));
+ return getGEFWrapper(new ShapeNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyCN.java
index 5ecf4a63ee5..fd9ac821f8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -115,13 +116,13 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateSignature_3033 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new TemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyTN.java
index 99766422cb2..3725117e2c8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -115,13 +116,13 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateSignature_3033 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new TemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index 41ee9b14552..ce9100d565e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ComponentCreateCommandCN;
@@ -68,79 +69,79 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3021 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3023 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCreateCommandCN(req));
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3029 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3040 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
index b4989bfa8e2..5dd438967d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ComponentCreateCommandCN;
@@ -68,79 +69,79 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3021 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3023 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCreateCommandCN(req));
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3029 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3040 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicy.java
index e16033c0f5f..024f9aba8e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -115,13 +116,13 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateSignature_3033 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new TemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicyCN.java
index 89a462ed9be..feac182f9ee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -115,13 +116,13 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateSignature_3033 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new TemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index dfd5ee529a1..e28be6287c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ComponentCreateCommandCN;
@@ -68,79 +69,79 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3021 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3023 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCreateCommandCN(req));
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3029 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3040 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index c0f0cc927b9..c1cb7537b09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ComponentCreateCommandCN;
@@ -68,79 +69,79 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new InstanceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3021 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3023 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCreateCommandCN(req));
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3029 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3040 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy.java
index 1d1426ba25a..6ddafb98ea3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyforPrimitiveTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class PrimitiveTypeAttributeCompartmentItemSemanticEditPolicy extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyforPrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new PropertyforPrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index 5b835d4b02f..d1d06ec9aaf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyforPrimitiveTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class PrimitiveTypeAttributeCompartmentItemSemanticEditPolicyCN extends U
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyforPrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new PropertyforPrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicy.java
index 930e8c24d76..07a584d8d7e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForPrimitiveTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class PrimitiveTypeOperationCompartmentItemSemanticEditPolicy extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForPrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new OperationForPrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 457c0b73f7f..a18e4b9d990 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationForPrimitiveTypeCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class PrimitiveTypeOperationCompartmentItemSemanticEditPolicyCN extends U
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForPrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new OperationForPrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
index 45532d8361b..be9b71a07f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassifierTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ConnectableElementTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationTemplateParameterCreateCommand;
@@ -59,25 +60,25 @@ public class RedefinableTemplateSignatureTemplateParameterCompartmentItemSemanti
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassifierTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new ClassifierTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectableElementTemplateParameter_3034 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConnectableElementTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new ConnectableElementTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OperationTemplateParameter_3035 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new OperationTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateParameter_3016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateParameterCreateCommand(req));
+ return getGEFWrapper(new TemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicy.java
index 27184d6502c..1aade2bb7a8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForSignalCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class SignalAttributeCompartmentItemSemanticEditPolicy extends UMLBaseIte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForSignalCreateCommand(req));
+ return getGEFWrapper(new PropertyForSignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicyCN.java
index 471cc7717d1..e8fd19cae1f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.PropertyForSignalCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
@@ -56,7 +57,7 @@ public class SignalAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForSignalCreateCommand(req));
+ return getGEFWrapper(new PropertyForSignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicy.java
index 7455325a449..31515f44124 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -122,7 +123,7 @@ public class SignalItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicyCN.java
index aa1288ed546..4da19a617ed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/SignalItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.AbstractionCreateCommand;
@@ -122,7 +123,7 @@ public class SignalItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req));
+ return getGEFWrapper(new RedefinableTemplateSignatureCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
index 18c6d745d13..3d5e8aad77f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/policies/TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.ClassifierTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.OperationTemplateParameterCreateCommand;
import org.eclipse.papyrus.uml.diagram.clazz.edit.commands.TemplateParameterCreateCommand;
@@ -58,19 +59,19 @@ public class TemplateSignatureTemplateParameterCompartmentItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassifierTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new ClassifierTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OperationTemplateParameter_3035 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationTemplateParameterCreateCommand(req));
+ return getGEFWrapper(new OperationTemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TemplateParameter_3016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TemplateParameterCreateCommand(req));
+ return getGEFWrapper(new TemplateParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
index be77b0896ee..7ee72fe4206 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/part/UMLVisualIDRegistry.java
@@ -91,13 +91,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return ModelEditPart.VISUAL_ID;
- }
- return -1;
+ return ModelEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
index 0c971a7afbb..9f3ec2a2f01 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
@@ -1,105 +1,107 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.common,
- org.eclipse.papyrus.uml.diagram.common.actions,
- org.eclipse.papyrus.uml.diagram.common.actions.handlers,
- org.eclipse.papyrus.uml.diagram.common.command.wrappers,
- org.eclipse.papyrus.uml.diagram.common.commands,
- org.eclipse.papyrus.uml.diagram.common.dialogs,
- org.eclipse.papyrus.uml.diagram.common.directedit,
- org.eclipse.papyrus.uml.diagram.common.dragtracker,
- org.eclipse.papyrus.uml.diagram.common.draw2d,
- org.eclipse.papyrus.uml.diagram.common.draw2d.anchors,
- org.eclipse.papyrus.uml.diagram.common.editparts,
- org.eclipse.papyrus.uml.diagram.common.editpolicies,
- org.eclipse.papyrus.uml.diagram.common.figure.edge,
- org.eclipse.papyrus.uml.diagram.common.figure.layout,
- org.eclipse.papyrus.uml.diagram.common.figure.node,
- org.eclipse.papyrus.uml.diagram.common.handlers,
- org.eclipse.papyrus.uml.diagram.common.helper,
- org.eclipse.papyrus.uml.diagram.common.ids,
- org.eclipse.papyrus.uml.diagram.common.layout,
- org.eclipse.papyrus.uml.diagram.common.listeners,
- org.eclipse.papyrus.uml.diagram.common.locator,
- org.eclipse.papyrus.uml.diagram.common.parser,
- org.eclipse.papyrus.uml.diagram.common.parser.assist,
- org.eclipse.papyrus.uml.diagram.common.parser.custom,
- org.eclipse.papyrus.uml.diagram.common.parser.lookup,
- org.eclipse.papyrus.uml.diagram.common.parser.packageimport,
- org.eclipse.papyrus.uml.diagram.common.parser.stereotype,
- org.eclipse.papyrus.uml.diagram.common.parser.structural,
- org.eclipse.papyrus.uml.diagram.common.part,
- org.eclipse.papyrus.uml.diagram.common.preferences,
- org.eclipse.papyrus.uml.diagram.common.providers,
- org.eclipse.papyrus.uml.diagram.common.providers.assistant,
- org.eclipse.papyrus.uml.diagram.common.resourceupdate,
- org.eclipse.papyrus.uml.diagram.common.service,
- org.eclipse.papyrus.uml.diagram.common.service.palette,
- org.eclipse.papyrus.uml.diagram.common.sheet,
- org.eclipse.papyrus.uml.diagram.common.ui.dialogs,
- org.eclipse.papyrus.uml.diagram.common.ui.helper,
- org.eclipse.papyrus.uml.diagram.common.util,
- org.eclipse.papyrus.uml.diagram.common.util.functions,
- org.eclipse.papyrus.uml.diagram.common.util.predicates
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.common,
+ org.eclipse.papyrus.uml.diagram.common.actions,
+ org.eclipse.papyrus.uml.diagram.common.actions.handlers,
+ org.eclipse.papyrus.uml.diagram.common.command.wrappers,
+ org.eclipse.papyrus.uml.diagram.common.commands,
+ org.eclipse.papyrus.uml.diagram.common.dialogs,
+ org.eclipse.papyrus.uml.diagram.common.directedit,
+ org.eclipse.papyrus.uml.diagram.common.dragtracker,
+ org.eclipse.papyrus.uml.diagram.common.draw2d,
+ org.eclipse.papyrus.uml.diagram.common.draw2d.anchors,
+ org.eclipse.papyrus.uml.diagram.common.editparts,
+ org.eclipse.papyrus.uml.diagram.common.editpolicies,
+ org.eclipse.papyrus.uml.diagram.common.figure.edge,
+ org.eclipse.papyrus.uml.diagram.common.figure.layout,
+ org.eclipse.papyrus.uml.diagram.common.figure.node,
+ org.eclipse.papyrus.uml.diagram.common.handlers,
+ org.eclipse.papyrus.uml.diagram.common.helper,
+ org.eclipse.papyrus.uml.diagram.common.ids,
+ org.eclipse.papyrus.uml.diagram.common.layout,
+ org.eclipse.papyrus.uml.diagram.common.listeners,
+ org.eclipse.papyrus.uml.diagram.common.locator,
+ org.eclipse.papyrus.uml.diagram.common.parser,
+ org.eclipse.papyrus.uml.diagram.common.parser.assist,
+ org.eclipse.papyrus.uml.diagram.common.parser.custom,
+ org.eclipse.papyrus.uml.diagram.common.parser.lookup,
+ org.eclipse.papyrus.uml.diagram.common.parser.packageimport,
+ org.eclipse.papyrus.uml.diagram.common.parser.stereotype,
+ org.eclipse.papyrus.uml.diagram.common.parser.structural,
+ org.eclipse.papyrus.uml.diagram.common.part,
+ org.eclipse.papyrus.uml.diagram.common.preferences,
+ org.eclipse.papyrus.uml.diagram.common.providers,
+ org.eclipse.papyrus.uml.diagram.common.providers.assistant,
+ org.eclipse.papyrus.uml.diagram.common.resourceupdate,
+ org.eclipse.papyrus.uml.diagram.common.service,
+ org.eclipse.papyrus.uml.diagram.common.service.palette,
+ org.eclipse.papyrus.uml.diagram.common.sheet,
+ org.eclipse.papyrus.uml.diagram.common.ui.dialogs,
+ org.eclipse.papyrus.uml.diagram.common.ui.helper,
+ org.eclipse.papyrus.uml.diagram.common.util,
+ org.eclipse.papyrus.uml.diagram.common.util.functions,
+ org.eclipse.papyrus.uml.diagram.common.util.predicates
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.3.0",
- org.eclipse.ui,
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.actions,
- org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.0",
- org.eclipse.core.expressions,
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.navigation;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.printing,
- org.eclipse.gmf.runtime.diagram.ui.providers.ide,
- org.eclipse.papyrus.infra.services.decoration;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.uml.profile;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
- org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
- org.eclipse.jface,
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.localizer;bundle-version="1.0.0",
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
- org.w3c.dom.svg,
- org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
- org.eclipse.core.databinding;bundle-version="1.4.1",
+Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor,
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="1.3.0",
+ org.eclipse.ui,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.actions,
+ org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.0",
+ org.eclipse.core.expressions,
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.navigation;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.printing,
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide,
+ org.eclipse.papyrus.infra.services.decoration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
+ org.eclipse.jface,
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.localizer;bundle-version="1.0.0",
+ org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
+ org.w3c.dom.svg,
+ org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
org.eclipse.gmf.tooling.runtime,
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.0.0"
-Bundle-Vendor: %providerName
-Ant-Version: Apache Ant 1.7.0
-Bundle-Version: 1.0.0.qualifier
-Eclipse-BuddyPolicy: dependent
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.common.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.common;singleton:
- =true
-
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.pluginexplorer;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
+Bundle-Vendor: %providerName
+Ant-Version: Apache Ant 1.7.0
+Bundle-Version: 1.0.0.qualifier
+Eclipse-BuddyPolicy: dependent
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.common.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.common;singleton:
+ =true
+
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
index 892c01f65c7..9acd6744dd8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/CreateBehavioredClassifierDiagramCommand.java
@@ -1,168 +1,143 @@
-/*******************************************************************************
- * Copyright (c) 2010 AtosOrigin.
- * 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:
- * AtosOrigin - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.uml.diagram.common.commands;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.BehavioredClassifier;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * Define a command to create a new Behavioral Diagram. This command is used by
- * all UI (toolbar, outline, creation wizards) to create a new Behavioral
- * Diagram. This class should be extended by behavioral diagram only.
- */
-public abstract class CreateBehavioredClassifierDiagramCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- private Behavior behavior = null;
-
- private String name = ""; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeDiagram(EObject diagram) {
- if(diagram instanceof Diagram) {
- Diagram diag = (Diagram)diagram;
- if(behavior != null) {
- diag.setElement(behavior);
- createBehaviorView(diag);
- }
- diag.setName(getName());
- }
-
- }
-
- /**
- * Create the associated behavior
- *
- * @return
- */
- protected Behavior createBehavior() {
- Behavior newBehavior = (Behavior)UMLFactory.eINSTANCE.create(getBehaviorEClass());
-
- return newBehavior;
- }
-
- /**
- * Get the kind of behavior associated to the diagram
- *
- * @return the EClass of the behavior supposed to own the diagram.
- */
- protected abstract EClass getBehaviorEClass();
-
- /**
- * {@inheritDoc}
- */
- protected void initializeModel(EObject owner) {
-
- if(owner.eClass() == getBehaviorEClass()) {
- behavior = (Behavior)owner;
-
- } else {
- behavior = (Behavior)UMLFactory.eINSTANCE.create(getBehaviorEClass());
-
- if(owner instanceof BehavioredClassifier) {
- BehavioredClassifier behaviorClassifier = (BehavioredClassifier)owner;
- behaviorClassifier.getOwnedBehaviors().add(behavior);
-
- } else if(owner instanceof Package) {
- org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package)owner;
- pack.getPackagedElements().add(behavior);
-
- }
- behavior.setName(NamedElementUtil.getName(behavior));
- }
- }
-
- private void createBehaviorView(Diagram diagram) {
- ViewService.getInstance().createView(Node.class, new EObjectAdapter(behavior), diagram, null, ViewUtil.APPEND, true, getPreferenceHint());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
- Diagram diagram = null;
- if(owner instanceof org.eclipse.uml2.uml.Package) {
- diagram = ViewService.createDiagram(owner, getDiagramNotationID(), getPreferenceHint());
- } else if(owner instanceof BehavioredClassifier) {
- diagram = ViewService.createDiagram(((BehavioredClassifier)owner).getNearestPackage(), getDiagramNotationID(), getPreferenceHint());
- }
- // create diagram
- if(diagram != null) {
- setName(name);
-
- initializeModel(owner);
- initializeDiagram(diagram);
- diagramResource.getContents().add(diagram);
- }
- return diagram;
- }
-
- /**
- * Set the name of the diagram and its containing element
- *
- * @param newName
- */
- protected void setName(String newName) {
- if(newName == null || newName.equals(name)) {
- return;
- }
- name = newName;
- }
-
- protected String getName() {
- return name;
- }
-
- // @Override
- // protected void runAsTransaction(DiResourceSet diResourceSet, EObject
- // container, String name) {
- // if(name == null && container instanceof NamedElement) {
- // setName(((NamedElement)container).getName());
- // if(!"".equals(getName())) {
- // // initialize name with activity's name
- // name = openDiagramNameDialog(getName());
- // if(name == null) {
- // // operation canceled
- // return;
- // }
- // }
- // }
- // super.runAsTransaction(diResourceSet, container,
- // getDefaultDiagramName());
- // }
-
- /**
- * Check if the creation of this diagram is strongly attached to its parent
- * or if it can be reassigned after creation.
- *
- * @return true if parent can be reassigned
- */
- public boolean isParentReassignable() {
- // Behavioral diagrams describe their parent behavior and only this one.
- // They can not be moved to another parent.
- return false;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010 AtosOrigin.
+ * 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:
+ * AtosOrigin - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.commands;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.BehavioredClassifier;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+
+/**
+ * Define a command to create a new Behavioral Diagram. This command is used by
+ * all UI (toolbar, outline, creation wizards) to create a new Behavioral
+ * Diagram. This class should be extended by behavioral diagram only.
+ */
+public abstract class CreateBehavioredClassifierDiagramCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
+
+ private Behavior behavior = null;
+
+ private String name = ""; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initializeDiagram(EObject diagram) {
+ if(diagram instanceof Diagram) {
+ Diagram diag = (Diagram)diagram;
+ if(behavior != null) {
+ diag.setElement(behavior);
+ createBehaviorView(diag);
+ }
+ diag.setName(getName());
+ }
+
+ }
+
+ /**
+ * Create the associated behavior
+ *
+ * @return
+ */
+ protected Behavior createBehavior() {
+ Behavior newBehavior = (Behavior)UMLFactory.eINSTANCE.create(getBehaviorEClass());
+
+ return newBehavior;
+ }
+
+ /**
+ * Get the kind of behavior associated to the diagram
+ *
+ * @return the EClass of the behavior supposed to own the diagram.
+ */
+ protected abstract EClass getBehaviorEClass();
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void initializeModel(EObject owner) {
+
+ if(owner.eClass() == getBehaviorEClass()) {
+ behavior = (Behavior)owner;
+
+ } else {
+ behavior = (Behavior)UMLFactory.eINSTANCE.create(getBehaviorEClass());
+
+ if(owner instanceof BehavioredClassifier) {
+ BehavioredClassifier behaviorClassifier = (BehavioredClassifier)owner;
+ behaviorClassifier.getOwnedBehaviors().add(behavior);
+
+ } else if(owner instanceof Package) {
+ org.eclipse.uml2.uml.Package pack = (org.eclipse.uml2.uml.Package)owner;
+ pack.getPackagedElements().add(behavior);
+
+ }
+ behavior.setName(NamedElementUtil.getName(behavior));
+ }
+ }
+
+ private void createBehaviorView(Diagram diagram) {
+ ViewService.getInstance().createView(Node.class, new EObjectAdapter(behavior), diagram, null, ViewUtil.APPEND, true, getPreferenceHint());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
+ Diagram diagram = null;
+ if(element instanceof org.eclipse.uml2.uml.Package) {
+ diagram = ViewService.createDiagram(element, getDiagramNotationID(), getPreferenceHint());
+ } else if(element instanceof BehavioredClassifier) {
+ diagram = ViewService.createDiagram(((BehavioredClassifier)element).getNearestPackage(), getDiagramNotationID(), getPreferenceHint());
+ }
+ // create diagram
+ if(diagram != null) {
+ setName(name);
+ diagram.setElement(element);
+ DiagramUtils.setOwner(diagram, owner);
+ if (!prototype.isNatural())
+ DiagramUtils.setPrototype(diagram, prototype);
+ initializeModel(element);
+ initializeDiagram(diagram);
+ diagramResource.getContents().add(diagram);
+ }
+ return diagram;
+ }
+
+ /**
+ * Set the name of the diagram and its containing element
+ *
+ * @param newName
+ */
+ protected void setName(String newName) {
+ if(newName == null || newName.equals(name)) {
+ return;
+ }
+ name = newName;
+ }
+
+ protected String getName() {
+ return name;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SupplementCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SupplementCommand.java
index 475d61a2eb0..bb59b7aa757 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SupplementCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/SupplementCommand.java
@@ -1,112 +1,116 @@
-/*****************************************************************************
- * Copyright (c) 2008 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.common.commands;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-
-/**
- * This class is used to supplement a gmf connection command.
- *
- * @author Patrick Tessier
- */
-public abstract class SupplementCommand {
-
- private EObject container;
-
- private final EObject source;
-
- private final EObject target;
-
- /**
- * the supplement command has the same parameter as connection create
- * command of gmf command
- *
- * @param container
- * the container of the link
- * @param source
- * the source of the link
- *
- * @param target
- * the target of the link
- */
- public SupplementCommand(EObject container, EObject source, EObject target) {
- super();
- this.container = container;
- this.source = source;
- this.target = target;
- }
-
- /**
- * this is the same fucntionnality as {@link IUndoableOperation}
- *
- * @return true if the command ca be executed
- */
- // @unused
- public abstract boolean canExecute();
-
- /**
- * Creates the request to configure the new element.
- *
- * @see EditElementCommand
- * @return the request
- */
- // @unused
- protected abstract ConfigureRequest createConfigureRequest(ConfigureRequest request);
-
- /**
- * this is the method tat realize the execution of the command
- *
- * @param newElement
- * the new element ro configure
- * @return the new element
- */
- public abstract EObject doDefaultElementCreation(TransactionalEditingDomain domain, EObject newElement);
-
- /**
- * use to obtain the container of the link
- *
- * @return the container of the link
- */
- public EObject getContainer() {
- return container;
- }
-
- /**
- * use to obtain the source of the link
- *
- * @return the source of the link
- */
- public EObject getSource() {
- return source;
- }
-
- /**
- * use to obtain the target of the link
- *
- * @return the target of the link
- */
- public EObject getTarget() {
- return target;
- }
-
- /**
- * use to set the container of the link
- */
- // @unused
- public void setContainer(EObject container) {
- this.container = container;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2008 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+
+/**
+ * This class is used to supplement a gmf connection command.
+ *
+ * @author Patrick Tessier
+ */
+public abstract class SupplementCommand {
+
+ private EObject container;
+
+ private final EObject source;
+
+ private final EObject target;
+
+ protected final Diagram diagram;
+
+ /**
+ * the supplement command has the same parameter as connection create
+ * command of gmf command
+ *
+ * @param container
+ * the container of the link
+ * @param source
+ * the source of the link
+ *
+ * @param target
+ * the target of the link
+ */
+ public SupplementCommand(EObject container, EObject source, EObject target, Diagram diagram) {
+ super();
+ this.container = container;
+ this.source = source;
+ this.target = target;
+ this.diagram = diagram;
+ }
+
+ /**
+ * this is the same fucntionnality as {@link IUndoableOperation}
+ *
+ * @return true if the command ca be executed
+ */
+ // @unused
+ public abstract boolean canExecute();
+
+ /**
+ * Creates the request to configure the new element.
+ *
+ * @see EditElementCommand
+ * @return the request
+ */
+ // @unused
+ protected abstract ConfigureRequest createConfigureRequest(ConfigureRequest request);
+
+ /**
+ * this is the method tat realize the execution of the command
+ *
+ * @param newElement
+ * the new element ro configure
+ * @return the new element
+ */
+ public abstract EObject doDefaultElementCreation(TransactionalEditingDomain domain, EObject newElement);
+
+ /**
+ * use to obtain the container of the link
+ *
+ * @return the container of the link
+ */
+ public EObject getContainer() {
+ return container;
+ }
+
+ /**
+ * use to obtain the source of the link
+ *
+ * @return the source of the link
+ */
+ public EObject getSource() {
+ return source;
+ }
+
+ /**
+ * use to obtain the target of the link
+ *
+ * @return the target of the link
+ */
+ public EObject getTarget() {
+ return target;
+ }
+
+ /**
+ * use to set the container of the link
+ */
+ // @unused
+ public void setContainer(EObject container) {
+ this.container = container;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/PaletteUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/PaletteUtil.java
index 0038328f8ca..eb1a09af05b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/PaletteUtil.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/PaletteUtil.java
@@ -1,498 +1,510 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.common.part;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.palette.PaletteContainer;
-import org.eclipse.gef.palette.PaletteEntry;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.palette.ToolEntry;
-import org.eclipse.gmf.runtime.common.core.service.IProvider;
-import org.eclipse.gmf.runtime.common.core.service.ProviderPriority;
-import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation;
-import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
-import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.core.utils.PapyrusTrace;
-import org.eclipse.papyrus.uml.diagram.common.Activator;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.papyrus.uml.diagram.common.service.IPapyrusPaletteConstant;
-import org.eclipse.papyrus.uml.diagram.common.service.IProfileDependantPaletteProvider;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService.ProviderDescriptor;
-import org.eclipse.papyrus.uml.diagram.common.service.palette.AspectToolService;
-import org.eclipse.papyrus.uml.diagram.common.service.palette.IAspectAction;
-import org.eclipse.papyrus.uml.diagram.common.service.palette.IAspectActionProvider;
-import org.eclipse.papyrus.uml.diagram.common.service.palette.IPostAction;
-import org.eclipse.papyrus.uml.diagram.common.service.palette.IPreAction;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IMemento;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Profile;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Utility class for palette.
- */
-public class PaletteUtil {
-
- /**
- * Returns the parent container by its ID
- *
- * @param entry
- * the palette container for which parent container is looked
- * @param parentID
- * the id of the parent container
- * @return the parent
- */
- public static PaletteContainer getContainerByID(PaletteContainer container, String parentID) {
- // check this element is the searched parent;
- if(parentID.equals(container.getId())) {
- return container;
- }
-
- // element is not the parent. Look its children
- Iterator<PaletteContainer> it = getDirectChildContainers(container).iterator();
- while(it.hasNext()) {
- PaletteContainer tmp = getContainerByID(it.next(), parentID);
- if(tmp != null) {
- return tmp;
- }
- }
- return null;
- }
-
- /**
- * Returns the type of metaclasses created by the toolentry
- *
- * @param entry
- * the entry for which metaclass created is searched
- * @return the type of metaclasses created by the toolentry or <code>null</code>.
- */
- public static EClass getToolMetaclass(ToolEntry entry) {
- Tool tool = entry.createTool();
- List<IElementType> types = null;
- if(tool instanceof AspectUnspecifiedTypeCreationTool) {
- types = ((AspectUnspecifiedTypeCreationTool)tool).getElementTypes();
- } else if(tool instanceof AspectUnspecifiedTypeConnectionTool) {
- types = ((AspectUnspecifiedTypeConnectionTool)tool).getElementTypes();
- }
- if(types != null && types.size() > 0) {
- IElementType type = types.get(0);
-
- if(type instanceof SpecializationType) {
- type = ((SpecializationType)type).getSpecializedTypes()[0];
- }
- return type.getEClass();
- }
- return null;
- }
-
- /**
- * Returns the parent container by its ID
- *
- * @param entry
- * the palette entry for which parent container is looked
- * @param parentID
- * the id of the parent container
- * @return the parent
- */
- public static PaletteContainer getContainerByID(PaletteEntry entry, String parentID) {
- // retrieve the root
- PaletteContainer root = getRoot(entry);
- return getContainerByID(root, parentID);
- }
-
- /**
- * Return the child containers directly contained by the specified container
- *
- * @param container
- * the container to look in.
- * @return the list of directly contained elements
- */
- @SuppressWarnings("unchecked")
- public static List<PaletteContainer> getDirectChildContainers(PaletteContainer container) {
- List<PaletteContainer> containers = new ArrayList<PaletteContainer>();
- Iterator<PaletteEntry> it = container.getChildren().iterator();
- while(it.hasNext()) {
- PaletteEntry entry = it.next();
- if(entry instanceof PaletteContainer) {
- containers.add((PaletteContainer)entry);
- }
- }
- return containers;
- }
-
- /**
- * Retrieves the root element for the given container
- *
- * @param container
- * the container for which the root is searched
- * @return the root of the container
- */
- public static PaletteContainer getRoot(PaletteContainer container) {
- // if container has a parent, returns it.
- if(container.getParent() != null) {
- return getRoot(container.getParent());
- }
- // else, root element is the container itself.
- return container;
- }
-
- /**
- * Retrieves the root element for the given palette entry
- *
- * @param container
- * the container for which the root is searched
- * @return the root of the container
- */
- public static PaletteContainer getRoot(PaletteEntry entry) {
- return getRoot(entry.getParent());
- }
-
- /**
- * Default constructor. Should never be used, as method are static in this
- * class.
- */
- // @unused
- private PaletteUtil() {
-
- }
-
- /**
- * return tool entries for the given {@link PaletteContainer} and its
- * sub-containers
- *
- * @param container
- * the container that contains the ToolEntries
- * @return the list of tool entries or an empty list
- */
- public static List<ToolEntry> getAllToolEntries(PaletteContainer container) {
- final List<ToolEntry> entries = new ArrayList<ToolEntry>();
- Iterator<PaletteEntry> it = container.getChildren().iterator();
- while(it.hasNext()) {
- PaletteEntry entry = it.next();
- if(entry instanceof ToolEntry) {
- entries.add((ToolEntry)entry);
- }
- if(entry instanceof PaletteContainer) {
- entries.addAll(getAllToolEntries((PaletteContainer)entry));
- }
- }
- return entries;
- }
-
- /**
- * Looks for the memento with the correct id from the root momento
- *
- * @param rootMemento
- * the root memento from which the memento is searched
- * @param id
- * the id of the memento to search
- * @return the memento with the given ID or <code>null</code> if no memento
- * was found
- */
- // @unused
- public static IMemento getMemento(IMemento rootMemento, String id) {
- IMemento memento = null;
- memento = rootMemento.getChild(id);
- return memento;
- }
-
- /**
- * Return all entries from a palette
- *
- * @param paletteRoot
- * the root from which tools are retrieved
- * @return the list of entries
- */
- public static List<PaletteEntry> getAllEntries(PaletteContainer container) {
- List<PaletteEntry> elements = new ArrayList<PaletteEntry>();
- for(Object object : container.getChildren()) {
- if(object instanceof PaletteContainer) {
- elements.add((PaletteContainer)object);
- elements.addAll(getAllEntries((PaletteContainer)object));
- } else if(object instanceof ToolEntry) {
- elements.add((ToolEntry)object);
- }
- }
- return elements;
- }
-
- /**
- * Returns all available entries for the given editor ID
- *
- * @param editorID
- * the editor to be contributed
- * @param priority
- * the priority max for the entries
- * @return the set of available entries
- */
- public static Set<? extends PaletteEntry> getAvailableEntries(IEditorPart part, ProviderPriority priority) {
- Set<? extends PaletteEntry> entries = new HashSet<PaletteEntry>();
-
- // retrieve all provider for the given editor ID
- PaletteRoot root = new PaletteRoot();
- List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
- ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, new HashMap<Object, Object>());
-
- // generate for each provider, according to priority
- @SuppressWarnings("unchecked")
- List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
- for(PapyrusPaletteService.ProviderDescriptor descriptor : providerList) {
- int compare = descriptor.getPriority().compareTo(priority);
- if(compare < 0) {
- if(descriptor.providesWithVisibility(operation)) {
- ((IPaletteProvider)descriptor.getProvider()).contributeToPalette(part, part.getEditorInput(), root, new HashMap<Object, Object>());
- }
- }
- }
- return entries;
- }
-
- /**
- * Returns all available entries for the given editor ID
- *
- * @param editorID
- * the editor to be contributed
- * @param priority
- * the priority max for the entries
- * @return the set of available entries
- */
- public static Map<String, PaletteEntry> getAvailableEntriesSet(IEditorPart part, ProviderPriority priority) {
- Map<String, PaletteEntry> entries = new HashMap<String, PaletteEntry>();
-
- // retrieve all provider for the given editor ID
- PaletteRoot root = new PaletteRoot();
- List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
- ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, entries);
-
- // generate for each provider, according to priority
- @SuppressWarnings("unchecked")
- List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
- for(PapyrusPaletteService.ProviderDescriptor descriptor : providerList) {
- int compare = descriptor.getPriority().compareTo(priority);
- if(compare <= 0) {
- if(descriptor.providesWithVisibility(operation)) {
- ((IPaletteProvider)descriptor.getProvider()).contributeToPalette(part, part.getEditorInput(), root, entries);
- }
- }
- }
- return entries;
- }
-
- /**
- * Returns the list of stereotypes String from a serialize string form
- *
- * @param serializedForm
- * the serialized form of the list of stereotypes
- * @return the list of stereotypes String from a serialize string form
- */
- public static List<String> getStereotypeListFromString(String serializedForm) {
- StringTokenizer tokenizer = new StringTokenizer(serializedForm, ",");
- List<String> list = new ArrayList<String>();
- while(tokenizer.hasMoreElements()) {
- list.add(tokenizer.nextToken().trim());
- }
- return list;
- }
-
- /**
- * Returns the list of stereotypes String under a serialized form
- *
- * @param list
- * the list of stereotypes to serialize
- * @return the list of stereotypes String under a serialized form
- */
- public static String getSerializedStereotypeList(Collection<String> stereotypes) {
- return convertToCommaSeparatedRepresentation(stereotypes);
- }
-
- /**
- * Returns the name of the profile from the given stereotype qualified Name
- *
- * @param stereotypeName
- * the name of the stereotype to parse
- * @return the qualified name of the profile from the given stereotype
- * qualified Name
- */
- public static String findProfileNameFromStereotypeName(String stereotypeName) {
- return stereotypeName.substring(0, stereotypeName.lastIndexOf(NamedElement.SEPARATOR));
- }
-
- /**
- * Returns the list of profile Qualified Names String under a serialized
- * form
- *
- * @param list
- * the list of profiles to serialize
- * @return the list of profiles String under a serialized form
- */
- public static String getSerializedProfileList(Collection<String> profiles) {
- return convertToCommaSeparatedRepresentation(profiles);
- }
-
- public static String convertToCommaSeparatedRepresentation(Collection objects) {
- return convertToFlatRepresentation(objects, ",");
- }
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.common.part;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gmf.runtime.common.core.service.IProvider;
+import org.eclipse.gmf.runtime.common.core.service.ProviderPriority;
+import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.utils.PapyrusTrace;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.common.service.IPapyrusPaletteConstant;
+import org.eclipse.papyrus.uml.diagram.common.service.IProfileDependantPaletteProvider;
+import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
+import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService.ProviderDescriptor;
+import org.eclipse.papyrus.uml.diagram.common.service.palette.AspectToolService;
+import org.eclipse.papyrus.uml.diagram.common.service.palette.IAspectAction;
+import org.eclipse.papyrus.uml.diagram.common.service.palette.IAspectActionProvider;
+import org.eclipse.papyrus.uml.diagram.common.service.palette.IPostAction;
+import org.eclipse.papyrus.uml.diagram.common.service.palette.IPreAction;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IMemento;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Profile;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Utility class for palette.
+ */
+public class PaletteUtil {
+
+ /**
+ * Returns the parent container by its ID
+ *
+ * @param entry
+ * the palette container for which parent container is looked
+ * @param parentID
+ * the id of the parent container
+ * @return the parent
+ */
+ public static PaletteContainer getContainerByID(PaletteContainer container, String parentID) {
+ // check this element is the searched parent;
+ if(parentID.equals(container.getId())) {
+ return container;
+ }
+
+ // element is not the parent. Look its children
+ Iterator<PaletteContainer> it = getDirectChildContainers(container).iterator();
+ while(it.hasNext()) {
+ PaletteContainer tmp = getContainerByID(it.next(), parentID);
+ if(tmp != null) {
+ return tmp;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the type of metaclasses created by the toolentry
+ *
+ * @param entry
+ * the entry for which metaclass created is searched
+ * @return the type of metaclasses created by the toolentry or <code>null</code>.
+ */
+ public static EClass getToolMetaclass(ToolEntry entry) {
+ Tool tool = entry.createTool();
+ List<IElementType> types = null;
+ if(tool instanceof AspectUnspecifiedTypeCreationTool) {
+ types = ((AspectUnspecifiedTypeCreationTool)tool).getElementTypes();
+ } else if(tool instanceof AspectUnspecifiedTypeConnectionTool) {
+ types = ((AspectUnspecifiedTypeConnectionTool)tool).getElementTypes();
+ }
+ if(types != null && types.size() > 0) {
+ IElementType type = types.get(0);
+
+ if(type instanceof SpecializationType) {
+ type = ((SpecializationType)type).getSpecializedTypes()[0];
+ }
+ return type.getEClass();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the parent container by its ID
+ *
+ * @param entry
+ * the palette entry for which parent container is looked
+ * @param parentID
+ * the id of the parent container
+ * @return the parent
+ */
+ public static PaletteContainer getContainerByID(PaletteEntry entry, String parentID) {
+ // retrieve the root
+ PaletteContainer root = getRoot(entry);
+ return getContainerByID(root, parentID);
+ }
+
+ /**
+ * Return the child containers directly contained by the specified container
+ *
+ * @param container
+ * the container to look in.
+ * @return the list of directly contained elements
+ */
+ @SuppressWarnings("unchecked")
+ public static List<PaletteContainer> getDirectChildContainers(PaletteContainer container) {
+ List<PaletteContainer> containers = new ArrayList<PaletteContainer>();
+ Iterator<PaletteEntry> it = container.getChildren().iterator();
+ while(it.hasNext()) {
+ PaletteEntry entry = it.next();
+ if(entry instanceof PaletteContainer) {
+ containers.add((PaletteContainer)entry);
+ }
+ }
+ return containers;
+ }
+
+ /**
+ * Retrieves the root element for the given container
+ *
+ * @param container
+ * the container for which the root is searched
+ * @return the root of the container
+ */
+ public static PaletteContainer getRoot(PaletteContainer container) {
+ // if container has a parent, returns it.
+ if(container.getParent() != null) {
+ return getRoot(container.getParent());
+ }
+ // else, root element is the container itself.
+ return container;
+ }
+
+ /**
+ * Retrieves the root element for the given palette entry
+ *
+ * @param container
+ * the container for which the root is searched
+ * @return the root of the container
+ */
+ public static PaletteContainer getRoot(PaletteEntry entry) {
+ return getRoot(entry.getParent());
+ }
+
+ /**
+ * Default constructor. Should never be used, as method are static in this
+ * class.
+ */
+ // @unused
+ private PaletteUtil() {
+
+ }
+
+ /**
+ * return tool entries for the given {@link PaletteContainer} and its
+ * sub-containers
+ *
+ * @param container
+ * the container that contains the ToolEntries
+ * @return the list of tool entries or an empty list
+ */
+ public static List<ToolEntry> getAllToolEntries(PaletteContainer container) {
+ final List<ToolEntry> entries = new ArrayList<ToolEntry>();
+ Iterator<PaletteEntry> it = container.getChildren().iterator();
+ while(it.hasNext()) {
+ PaletteEntry entry = it.next();
+ if(entry instanceof ToolEntry) {
+ entries.add((ToolEntry)entry);
+ }
+ if(entry instanceof PaletteContainer) {
+ entries.addAll(getAllToolEntries((PaletteContainer)entry));
+ }
+ }
+ return entries;
+ }
+
+ /**
+ * Looks for the memento with the correct id from the root momento
+ *
+ * @param rootMemento
+ * the root memento from which the memento is searched
+ * @param id
+ * the id of the memento to search
+ * @return the memento with the given ID or <code>null</code> if no memento
+ * was found
+ */
+ // @unused
+ public static IMemento getMemento(IMemento rootMemento, String id) {
+ IMemento memento = null;
+ memento = rootMemento.getChild(id);
+ return memento;
+ }
+
+ /**
+ * Return all entries from a palette
+ *
+ * @param paletteRoot
+ * the root from which tools are retrieved
+ * @return the list of entries
+ */
+ public static List<PaletteEntry> getAllEntries(PaletteContainer container) {
+ List<PaletteEntry> elements = new ArrayList<PaletteEntry>();
+ for(Object object : container.getChildren()) {
+ if(object instanceof PaletteContainer) {
+ elements.add((PaletteContainer)object);
+ elements.addAll(getAllEntries((PaletteContainer)object));
+ } else if(object instanceof ToolEntry) {
+ elements.add((ToolEntry)object);
+ }
+ }
+ return elements;
+ }
+
+ /**
+ * Returns all available entries for the given editor ID
+ *
+ * @param editorID
+ * the editor to be contributed
+ * @param priority
+ * the priority max for the entries
+ * @return the set of available entries
+ */
+ public static Set<? extends PaletteEntry> getAvailableEntries(IEditorPart part, ProviderPriority priority) {
+ Set<? extends PaletteEntry> entries = new HashSet<PaletteEntry>();
+
+ // retrieve all provider for the given editor ID
+ PaletteRoot root = new PaletteRoot();
+ List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
+ ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, new HashMap<Object, Object>());
+
+ // generate for each provider, according to priority
+ @SuppressWarnings("unchecked")
+ List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
+ for(PapyrusPaletteService.ProviderDescriptor descriptor : providerList) {
+ int compare = descriptor.getPriority().compareTo(priority);
+ if(compare < 0) {
+ if(descriptor.providesWithVisibility(operation)) {
+ ((IPaletteProvider)descriptor.getProvider()).contributeToPalette(part, part.getEditorInput(), root, new HashMap<Object, Object>());
+ }
+ }
+ }
+ return entries;
+ }
+
+ /**
+ * Returns all available entries for the given editor ID
+ *
+ * @param editorID
+ * the editor to be contributed
+ * @param priority
+ * the priority max for the entries
+ * @return the set of available entries
+ */
+ public static Map<String, PaletteEntry> getAvailableEntriesSet(IEditorPart part, ProviderPriority priority) {
+ Map<String, PaletteEntry> entries = new HashMap<String, PaletteEntry>();
+
+ // retrieve all provider for the given editor ID
+ PaletteRoot root = new PaletteRoot();
+ List<? extends PapyrusPaletteService.ProviderDescriptor> providers = (List<? extends ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
+ ContributeToPaletteOperation operation = new ContributeToPaletteOperation(part, part.getEditorInput(), root, entries);
+
+ // generate for each provider, according to priority
+ @SuppressWarnings("unchecked")
+ List<PapyrusPaletteService.ProviderDescriptor> providerList = (List<PapyrusPaletteService.ProviderDescriptor>)PapyrusPaletteService.getInstance().getProviders();
+ for(PapyrusPaletteService.ProviderDescriptor descriptor : providerList) {
+ int compare = descriptor.getPriority().compareTo(priority);
+ if(compare <= 0) {
+ if(descriptor.providesWithVisibility(operation)) {
+ ((IPaletteProvider)descriptor.getProvider()).contributeToPalette(part, part.getEditorInput(), root, entries);
+ }
+ }
+ }
+ return entries;
+ }
+
+ /**
+ * Returns the list of stereotypes String from a serialize string form
+ *
+ * @param serializedForm
+ * the serialized form of the list of stereotypes
+ * @return the list of stereotypes String from a serialize string form
+ */
+ public static List<String> getStereotypeListFromString(String serializedForm) {
+ StringTokenizer tokenizer = new StringTokenizer(serializedForm, ",");
+ List<String> list = new ArrayList<String>();
+ while(tokenizer.hasMoreElements()) {
+ list.add(tokenizer.nextToken().trim());
+ }
+ return list;
+ }
+
+ /**
+ * Returns the list of stereotypes String under a serialized form
+ *
+ * @param list
+ * the list of stereotypes to serialize
+ * @return the list of stereotypes String under a serialized form
+ */
+ public static String getSerializedStereotypeList(Collection<String> stereotypes) {
+ return convertToCommaSeparatedRepresentation(stereotypes);
+ }
+
+ /**
+ * Returns the name of the profile from the given stereotype qualified Name
+ *
+ * @param stereotypeName
+ * the name of the stereotype to parse
+ * @return the qualified name of the profile from the given stereotype
+ * qualified Name
+ */
+ public static String findProfileNameFromStereotypeName(String stereotypeName) {
+ return stereotypeName.substring(0, stereotypeName.lastIndexOf(NamedElement.SEPARATOR));
+ }
+
+ /**
+ * Returns the list of profile Qualified Names String under a serialized
+ * form
+ *
+ * @param list
+ * the list of profiles to serialize
+ * @return the list of profiles String under a serialized form
+ */
+ public static String getSerializedProfileList(Collection<String> profiles) {
+ return convertToCommaSeparatedRepresentation(profiles);
+ }
+
+ public static String convertToCommaSeparatedRepresentation(Collection objects) {
+ return convertToFlatRepresentation(objects, ",");
+ }
+
+ public static String convertToFlatRepresentation(Collection objects, String separator) {
+ StringBuilder buffer = new StringBuilder();
+ Iterator it = objects.iterator();
+ while(it.hasNext()) {
+ buffer.append(it.next());
+ if(it.hasNext()) {
+ buffer.append(separator);
+ }
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * Returns the list of profiles String from a serialize string form
+ *
+ * @param serializedForm
+ * the serialized form of the list of stereotypes
+ * @return the list of profiles String from a serialize string form
+ */
+ public static Set<String> getProfileSetFromString(String serializedForm) {
+ StringTokenizer tokenizer = new StringTokenizer(serializedForm, ",");
+ Set<String> list = new HashSet<String>();
+ while(tokenizer.hasMoreElements()) {
+ list.add(tokenizer.nextToken());
+ }
+ return list;
+ }
+
+ /**
+ * returns <code>true</code> if the descriptor have all necessary profiles
+ *
+ * @param part
+ * the editor part for which the palette is shown
+ * @param papyrusProviderDesc
+ * the current provider descriptor to test
+ * @return <code>true</code> if all required profile are present
+ */
+ public static boolean areRequiredProfileApplied(IEditorPart part, PapyrusPaletteService.ProviderDescriptor papyrusProviderDesc) {
+ if(!(part instanceof DiagramEditorWithFlyOutPalette)) {
+ PapyrusTrace.log(IStatus.WARNING, "trying to check a papyrus palette descriptor outside papyrus framework");
+ return false;
+ }
+ if(papyrusProviderDesc instanceof PapyrusPaletteService.LocalProviderDescriptor) {
+ IPaletteDescription description = ((PapyrusPaletteService.LocalProviderDescriptor)papyrusProviderDesc).getDescription();
+ // checks the presence of required profile
+ Diagram diagram = ((DiagramEditorWithFlyOutPalette)part).getDiagram();
+ EObject element = diagram.getElement();
+ if(element instanceof Element) {
+ org.eclipse.uml2.uml.Package package_ = ((Element)element).getNearestPackage();
+ List<Profile> appliedProfiles = package_.getAllAppliedProfiles();
+ List<String> appliedProfilesNames = new ArrayList<String>();
+ for(Profile profile : appliedProfiles) {
+ appliedProfilesNames.add(profile.getQualifiedName());
+ }
+
+ // compare to the list of profiles used by the palette
+ Map<String, String> properties = description.getProperties();
+ if(description != null) {
+ String requiredProfilesList = properties.get(IPapyrusPaletteConstant.PROFILE_LIST);
+ if(requiredProfilesList != null) {
+ // parse requiredProfile string (profile1QN, profile2QN,
+ // etc.)
+ Set<String> requiredProfiles = PaletteUtil.getProfileSetFromString(requiredProfilesList);
+ for(String requiredProfileName : requiredProfiles) {
+ if(!appliedProfilesNames.contains(requiredProfileName)) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ IProvider provider = papyrusProviderDesc.getProvider();
+ if(provider instanceof IProfileDependantPaletteProvider) {
+ Diagram diagram = ((DiagramEditorWithFlyOutPalette)part).getDiagram();
+ return areRequiredProfileApplied(diagram, (IProfileDependantPaletteProvider)provider);
+ }
+ }
+ // by default, returns true if the descriptor is not a local descriptor,
+ // as they do not use
+ // profile
+ return true;
+ }
- public static String convertToFlatRepresentation(Collection objects, String separator) {
- StringBuilder buffer = new StringBuilder();
- Iterator it = objects.iterator();
- while(it.hasNext()) {
- buffer.append(it.next());
- if(it.hasNext()) {
- buffer.append(separator);
- }
- }
- return buffer.toString();
- }
-
- /**
- * Returns the list of profiles String from a serialize string form
- *
- * @param serializedForm
- * the serialized form of the list of stereotypes
- * @return the list of profiles String from a serialize string form
- */
- public static Set<String> getProfileSetFromString(String serializedForm) {
- StringTokenizer tokenizer = new StringTokenizer(serializedForm, ",");
- Set<String> list = new HashSet<String>();
- while(tokenizer.hasMoreElements()) {
- list.add(tokenizer.nextToken());
- }
- return list;
- }
-
/**
* returns <code>true</code> if the descriptor have all necessary profiles
- *
- * @param part
- * the editor part for which the palette is shown
- * @param papyrusProviderDesc
- * the current provider descriptor to test
+ * @param diagram The diagram being provided palette elements
+ * @param provider The profile-dependent palette provider
* @return <code>true</code> if all required profile are present
*/
- public static boolean areRequiredProfileApplied(IEditorPart part, PapyrusPaletteService.ProviderDescriptor papyrusProviderDesc) {
- if(!(part instanceof DiagramEditorWithFlyOutPalette)) {
- PapyrusTrace.log(IStatus.WARNING, "trying to check a papyrus palette descriptor outside papyrus framework");
- return false;
- }
- if(papyrusProviderDesc instanceof PapyrusPaletteService.LocalProviderDescriptor) {
- IPaletteDescription description = ((PapyrusPaletteService.LocalProviderDescriptor)papyrusProviderDesc).getDescription();
- // checks the presence of required profile
- Diagram diagram = ((DiagramEditorWithFlyOutPalette)part).getDiagram();
- EObject element = diagram.getElement();
- if(element instanceof Element) {
- org.eclipse.uml2.uml.Package package_ = ((Element)element).getNearestPackage();
- List<Profile> appliedProfiles = package_.getAllAppliedProfiles();
- List<String> appliedProfilesNames = new ArrayList<String>();
- for(Profile profile : appliedProfiles) {
- appliedProfilesNames.add(profile.getQualifiedName());
- }
-
- // compare to the list of profiles used by the palette
- Map<String, String> properties = description.getProperties();
- if(description != null) {
- String requiredProfilesList = properties.get(IPapyrusPaletteConstant.PROFILE_LIST);
- if(requiredProfilesList != null) {
- // parse requiredProfile string (profile1QN, profile2QN,
- // etc.)
- Set<String> requiredProfiles = PaletteUtil.getProfileSetFromString(requiredProfilesList);
- for(String requiredProfileName : requiredProfiles) {
- if(!appliedProfilesNames.contains(requiredProfileName)) {
- return false;
- }
- }
- }
- }
+ public static boolean areRequiredProfileApplied(Diagram diagram, IProfileDependantPaletteProvider provider) {
+ EObject element = diagram.getElement();
+ if(element instanceof Element) {
+ org.eclipse.uml2.uml.Package package_ = ((Element)element).getNearestPackage();
+ if (package_ == null)
+ return false;
+ List<Profile> appliedProfiles = package_.getAllAppliedProfiles();
+ List<String> appliedProfilesNames = new ArrayList<String>();
+ for(Profile profile : appliedProfiles) {
+ appliedProfilesNames.add(profile.getQualifiedName());
}
- } else {
- IProvider provider = papyrusProviderDesc.getProvider();
- if(provider instanceof IProfileDependantPaletteProvider) {
- Diagram diagram = ((DiagramEditorWithFlyOutPalette)part).getDiagram();
- EObject element = diagram.getElement();
- if(element instanceof Element) {
- org.eclipse.uml2.uml.Package package_ = ((Element)element).getNearestPackage();
- List<Profile> appliedProfiles = package_.getAllAppliedProfiles();
- List<String> appliedProfilesNames = new ArrayList<String>();
- for(Profile profile : appliedProfiles) {
- appliedProfilesNames.add(profile.getQualifiedName());
- }
- // not null also
- Collection<String> requiredProfiles = ((IProfileDependantPaletteProvider)provider).getRequiredProfiles();
- for(String requiredProfileName : requiredProfiles) {
- if(!appliedProfilesNames.contains(requiredProfileName)) {
- return false;
- }
- }
+ // not null also
+ Collection<String> requiredProfiles = ((IProfileDependantPaletteProvider)provider).getRequiredProfiles();
+ for(String requiredProfileName : requiredProfiles) {
+ if(!appliedProfilesNames.contains(requiredProfileName)) {
+ return false;
}
- return true;
}
}
- // by default, returns true if the descriptor is not a local descriptor,
- // as they do not use
- // profile
return true;
}
-
- public static void initAspectActions(NodeList aspectActionNodes, List<IPostAction> postActions, List<IPreAction> preActions) {
- for(int i = 0; i < aspectActionNodes.getLength(); i++) {
- Node childNode = aspectActionNodes.item(i);
- String childName = childNode.getNodeName();
- if(IPapyrusPaletteConstant.POST_ACTION.equals(childName)) {
- // node is a post action => retrieve the id of the factory in charge of this configuration
- IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
- if(provider != null) {
- IAspectAction action = provider.createAction(childNode);
- if (action instanceof IPostAction) {
- postActions.add((IPostAction)action);
- }
- } else {
- Activator.log.error("impossible to find factory with id: " + AspectToolService.getProviderId(childNode), null);
- }
- } else if(IPapyrusPaletteConstant.PRE_ACTION.equals(childName)) {
- // node is a pre action => retrieve the id of the factory in charge of this configuration
- IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
- if(provider != null) {
- IAspectAction action = provider.createAction(childNode);
- if (action instanceof IPreAction) {
- preActions.add((IPreAction)action);
- }
- } else {
- Activator.log.error("impossible to find factory with id: " + AspectToolService.getProviderId(childNode), null);
- }
- }
- }
- }
-
-}
+
+ public static void initAspectActions(NodeList aspectActionNodes, List<IPostAction> postActions, List<IPreAction> preActions) {
+ for(int i = 0; i < aspectActionNodes.getLength(); i++) {
+ Node childNode = aspectActionNodes.item(i);
+ String childName = childNode.getNodeName();
+ if(IPapyrusPaletteConstant.POST_ACTION.equals(childName)) {
+ // node is a post action => retrieve the id of the factory in charge of this configuration
+ IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
+ if(provider != null) {
+ IAspectAction action = provider.createAction(childNode);
+ if (action instanceof IPostAction) {
+ postActions.add((IPostAction)action);
+ }
+ } else {
+ Activator.log.error("impossible to find factory with id: " + AspectToolService.getProviderId(childNode), null);
+ }
+ } else if(IPapyrusPaletteConstant.PRE_ACTION.equals(childName)) {
+ // node is a pre action => retrieve the id of the factory in charge of this configuration
+ IAspectActionProvider provider = AspectToolService.getInstance().getProvider(AspectToolService.getProviderId(childNode));
+ if(provider != null) {
+ IAspectAction action = provider.createAction(childNode);
+ if (action instanceof IPreAction) {
+ preActions.add((IPreAction)action);
+ }
+ } else {
+ Activator.log.error("impossible to find factory with id: " + AspectToolService.getProviderId(childNode), null);
+ }
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/FilteringPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/FilteringPaletteProvider.java
new file mode 100755
index 00000000000..a99beb955cb
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/FilteringPaletteProvider.java
@@ -0,0 +1,306 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.Activator;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.ui.IEditorPart;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Represents a palette provider which filters it content based on the use cases
+ * @author Laurent Wouters
+ */
+public class FilteringPaletteProvider implements IPaletteProvider {
+
+ /**
+ * Provider of a policy-enforced custom palette
+ *
+ * @author Laurent Wouters
+ */
+ private static class CustomPaletteProvider extends LocalPaletteProvider {
+ /**
+ * Sets the palette at the given uri as the contribution
+ *
+ * @param uri
+ * URI of a custom palette
+ */
+ public void setContributions(String uri) {
+ readXMLDocument(uri);
+ }
+
+ public NodeList getContributions() {
+ return contributions;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.service.LocalPaletteProvider#getXmlFile(java.lang.String)
+ */
+ @Override
+ public InputStream getXmlFile(String path) throws IOException {
+ return URIConverter.INSTANCE.createInputStream(URI.createURI(path));
+ }
+ }
+
+ /**
+ * Retrieve all elements of a palette contribution
+ *
+ */
+ private static class WalkerPaletteContribution implements IPapyrusPaletteConstant {
+
+ /**
+ * Retrieve all elements ID of the palette contributions
+ *
+ * @param contributions
+ * the palette contributions
+ * @return the list of palette nodes ID
+ */
+ public static List<String> getAllPaletteNodesID(NodeList contributions) {
+ List<String> paletteNodesID = new ArrayList<String>();
+ for(int i = 0; i < contributions.getLength(); i++) {
+ Node node = contributions.item(i);
+ if(PALETTE_DEFINITION.equals(node.getNodeName())) {
+ paletteNodesID.addAll(walkDefinition(node));
+ }
+ }
+ return paletteNodesID;
+ }
+
+ /**
+ * Parse the given node, assuming its type is a palette definition
+ *
+ * @param paletteDefinitionNode
+ * the node to parse
+ * @return the list of palette nodes ID
+ */
+ private static List<String> walkDefinition(Node paletteDefinitionNode) {
+ List<String> paletteNodesID = new ArrayList<String>();
+ NodeList nodes = paletteDefinitionNode.getChildNodes();
+ for(int i = 0; i < nodes.getLength(); i++) {
+ Node node = nodes.item(i);
+ if(CONTENT.equals(node.getNodeName())) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ }
+ return paletteNodesID;
+ }
+
+ /**
+ * Parse the contents of a palette definition
+ *
+ * @param paletteContentNode
+ * the node to parse
+ * @return the list of palette nodes ID
+ */
+ private static List<String> walkContentNode(Node paletteContentNode) {
+ List<String> paletteNodesID = new ArrayList<String>();
+ NodeList nodes = paletteContentNode.getChildNodes();
+ for(int i = 0; i < nodes.getLength(); i++) {
+ Node node = nodes.item(i);
+ String name = node.getNodeName();
+ String nodeID = null;
+ if(DRAWER.equals(name)) {
+ nodeID = node.getAttributes().getNamedItem(ID).getNodeValue();
+ paletteNodesID.add(nodeID);
+ if(node.getChildNodes().getLength() > 0) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ } else if(STACK.equals(name)) {
+ nodeID = node.getAttributes().getNamedItem(ID).getNodeValue();
+ paletteNodesID.add(nodeID);
+ if(node.getChildNodes().getLength() > 0) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ } else if(SEPARATOR.equals(name)) {
+ nodeID = node.getAttributes().getNamedItem(ID).getNodeValue();
+ paletteNodesID.add(nodeID);
+ if(node.getChildNodes().getLength() > 0) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ } else if(TOOL.equals(name)) {
+ nodeID = node.getAttributes().getNamedItem(ID).getNodeValue();
+ paletteNodesID.add(nodeID);
+ if(node.getChildNodes().getLength() > 0) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ } else if(ASPECT_TOOL.equals(name)) {
+ nodeID = node.getAttributes().getNamedItem(ID).getNodeValue();
+ paletteNodesID.add(nodeID);
+ if(node.getChildNodes().getLength() > 0) {
+ paletteNodesID.addAll(walkContentNode(node));
+ }
+ }
+ }
+ return paletteNodesID;
+ }
+ }
+
+ /**
+ * The original palette provider to delegate to
+ */
+ private DefaultPaletteProvider proxied;
+ /**
+ * The root configuration element for this palette provider
+ */
+ private IConfigurationElement config;
+ /**
+ * The view to which the palette will be provided
+ */
+ private Diagram diagram;
+ /**
+ * The exception to the filtering scheme.
+ * Palette entry IDs in this array are always allowed, regardless of the current configuration.
+ */
+ private String[] exceptions;
+
+ private NodeList contributions;
+
+ /**
+ * Initializes the provider
+ * @param proxied The original provider
+ * @param exceptions Entry IDs that should never be filtered
+ */
+ public FilteringPaletteProvider(DefaultPaletteProvider proxied, String[] exceptions) {
+ this.proxied = proxied;
+ this.exceptions = exceptions.clone();
+ }
+
+ /**
+ * Determines whether a palette element with the given entry ID should be exposed to the user
+ * @param entryID A palette element entry ID
+ * @return <code>true</code> if the element should be exposed
+ */
+ public boolean shouldExpose(String entryID) {
+ for (int i=0; i!=exceptions.length; i++)
+ if (entryID.startsWith(exceptions[i]))
+ return true;
+ return PolicyChecker.getCurrent().isInPalette(diagram, entryID);
+ }
+
+ /**
+ * Clear the contributions of the proxied palette provider.
+ * This is necessary because the actual contributions depends on the diagram's properties.
+ */
+ private void clearContributions() {
+ // this is going to be dirty ...
+ try {
+ Field field = proxied.getClass().getDeclaredField("contributions");
+ field.setAccessible(true);
+ List<?> list = (List<?>)field.get(proxied);
+ list.clear();
+ }
+ catch (Exception e) {
+ Activator.getDefault().getPapyrusLog().error("Failed to setup the filtering palette's configuration", e);
+ }
+ }
+
+ /**
+ * Retrieves the URI of the policy-enforced custom palette, if any
+ *
+ * @return The policy-enforced custom palette's URI
+ */
+ private String getCustomPalette() {
+ ViewPrototype proto = ViewPrototype.get(diagram);
+ PapyrusDiagram pd = (PapyrusDiagram) proto.getConfiguration();
+ if (pd == null)
+ return null;
+ return pd.getCustomPalette();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider#contributeToPalette(org.eclipse.ui.IEditorPart, java.lang.Object, org.eclipse.gef.palette.PaletteRoot, java.util.Map)
+ */
+ public void contributeToPalette(IEditorPart editor, Object content, PaletteRoot root, Map predefinedEntries) {
+ // the view needs to be known now because the actual filtering is called within setContributions
+ diagram = ((DiagramEditor)editor).getDiagram();
+
+ // Setting up the actual contribution
+ clearContributions();
+ proxied.setContributions(config);
+ // delegate the call to the proxied provider which is now ready
+ proxied.contributeToPalette(editor, content, root, predefinedEntries);
+
+ // retrieves the custom palette
+ String paletteURI = getCustomPalette();
+ if (paletteURI != null && !paletteURI.isEmpty()) {
+ CustomPaletteProvider provider = new CustomPaletteProvider();
+ provider.setContributions(paletteURI);
+ contributions = provider.getContributions();
+ List<String> nodesID = WalkerPaletteContribution.getAllPaletteNodesID(contributions);
+
+ // verify if the elements (nodes) from the custom palette already contributed
+ if (!isCustomPaletteContributed(predefinedEntries, nodesID)) {
+ provider.contributeToPalette(editor, content, root, predefinedEntries);
+ }
+ }
+ }
+
+ /**
+ * Verify if the elements (nodes) from the custom palette already contributed
+ *
+ * @param predefinedEntries
+ * the Predefined Entries already added
+ * @param nodesID
+ * the list of elements (nodes) ID from the custom palette
+ * @return true or false
+ */
+ public boolean isCustomPaletteContributed(Map predefinedEntries, List<String> nodesID) {
+ for (String nodeID : nodesID ) {
+ if (!predefinedEntries.containsKey(nodeID)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider#setContributions(org.eclipse.core.runtime.IConfigurationElement)
+ */
+ public void setContributions(IConfigurationElement configElement) { config = configElement; }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.common.core.service.IProvider#provides(org.eclipse.gmf.runtime.common.core.service.IOperation)
+ */
+ public boolean provides(IOperation operation) { return proxied.provides(operation); }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.common.core.service.IProvider#addProviderChangeListener(org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener)
+ */
+ public void addProviderChangeListener(IProviderChangeListener listener) { proxied.addProviderChangeListener(listener); }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.gmf.runtime.common.core.service.IProvider#removeProviderChangeListener(org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener)
+ */
+ public void removeProviderChangeListener(IProviderChangeListener listener) { proxied.removeProviderChangeListener(listener); }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java
index 5126b349a45..a7389275633 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/LocalPaletteProvider.java
@@ -26,6 +26,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.part.IPaletteDescription;
@@ -45,9 +46,6 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr
*/
protected NodeList contributions = null;
- /** parser used for the xml file */
- protected XMLDefinitionPaletteParser parser;
-
/**
* {@inheritDoc}
*/
@@ -56,12 +54,12 @@ public class LocalPaletteProvider extends AbstractProvider implements IPalettePr
if(contributions ==null) {
return;
}
- parser = new XMLDefinitionPaletteParser(new XMLDefinitionPaletteFactory(root, predefinedEntries));
+ XMLPaletteDefinitionWalker walker = new XMLPaletteDefinitionWalker(new XMLPaletteApplicator(((DiagramEditor) editor).getDiagram(), root, predefinedEntries));
for(int i = 0; i < contributions.getLength(); i++) {
Node node = contributions.item(i);
if(PALETTE_DEFINITION.equals(node.getNodeName())) {
- parser.parsePaletteDefinition(node);
+ walker.walk(node);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java
index ff6b681f8ba..0a68ed39006 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PapyrusPaletteService.java
@@ -38,10 +38,12 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChang
import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteDrawer;
import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.PaletteSeparator;
@@ -58,10 +60,16 @@ import org.eclipse.gmf.runtime.common.ui.services.util.ActivityFilterProviderDes
import org.eclipse.gmf.runtime.common.ui.util.ActivityUtil;
import org.eclipse.gmf.runtime.diagram.ui.internal.DiagramUIPlugin;
import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation;
+import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor;
import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette;
+import org.eclipse.gmf.runtime.diagram.ui.providers.DefaultPaletteProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteService;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.SelectionToolEx;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.Messages;
import org.eclipse.papyrus.uml.diagram.common.part.IPaletteDescription;
@@ -70,6 +78,7 @@ import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPalettePreferences;
import org.eclipse.papyrus.uml.diagram.common.service.XMLPaletteProviderConfiguration.EditorDescriptor;
import org.eclipse.ui.IEditorPart;
import org.osgi.framework.Bundle;
+import org.w3c.dom.NodeList;
/**
* Service that contributes to the palette of a given editor with a given
@@ -279,14 +288,16 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
@Override
public IProvider getProvider() {
if(provider == null) {
- IProvider newProvider = super.getProvider();
- if(provider instanceof IPaletteProvider) {
- IPaletteProvider defaultProvider = (IPaletteProvider)newProvider;
- defaultProvider.setContributions(getElement());
+ super.getProvider();
+ if (provider instanceof DefaultPaletteProvider) {
+ IPaletteProvider filtering = new FilteringPaletteProvider((DefaultPaletteProvider) provider, new String[] { GROUP_STANDARD, SEPARATOR_STANDARD, TOOL_SELECTION });
+ filtering.setContributions(getElement());
+ provider = filtering;
+ } else if (provider instanceof IPaletteProvider) {
+ ((IPaletteProvider)provider).setContributions(getElement());
}
- return newProvider;
}
- return super.getProvider();
+ return provider;
}
}
@@ -867,9 +878,27 @@ public class PapyrusPaletteService extends PaletteService implements IPalettePro
} catch (Exception e) {
Activator.getDefault().logError("Error in PapyrusPaletteService::createPalette()", e); //$NON-NLS-1$
}
+
+ Diagram diagram = ((DiagramEditor)editor).getDiagram();
+ for (Object o : root.getChildren()) {
+ if (o instanceof PaletteDrawer) {
+ PaletteDrawer drawer = (PaletteDrawer)o;
+ boolean isVisible = PolicyChecker.getCurrent().isInPalette(diagram, drawer.getId());
+ drawer.setVisible(isVisible);
+ if (isVisible) {
+ for (Object x : drawer.getChildren()) {
+ if (x instanceof PaletteEntry) {
+ PaletteEntry entry = (PaletteEntry)x;
+ entry.setVisible(PolicyChecker.getCurrent().isInPalette(diagram, entry.getId()));
+ }
+ }
+ }
+ }
+ }
return root;
}
-
+
+
/**
* {@inheritDoc}
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PluginPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PluginPaletteProvider.java
index 8f11d0c7dbf..651e5980ee3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PluginPaletteProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/PluginPaletteProvider.java
@@ -13,19 +13,16 @@
package org.eclipse.papyrus.uml.diagram.common.service;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.infra.core.pluginexplorer.Plugin;
+import org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.osgi.framework.Bundle;
import org.w3c.dom.Node;
@@ -60,28 +57,9 @@ public class PluginPaletteProvider extends LocalPaletteProvider implements IProf
// try to read it in a plugin...
Bundle bundle = Platform.getBundle(getProviderID());
if(bundle != null && bundle.getEntry(path)!=null) {
- URL urlFile = bundle.getEntry(path);
- urlFile = FileLocator.resolve(urlFile);
- urlFile = FileLocator.toFileURL(urlFile);
- if("file".equals(urlFile.getProtocol())) { //$NON-NLS-1$
- return new FileInputStream(urlFile.getFile());
- } else if("jar".equals(urlFile.getProtocol())) { //$NON-NLS-1$
- String filePath = urlFile.getPath();
- if(filePath.startsWith("file:")) {
- // strip off the file: and the !/
- int jarPathEndIndex = filePath.indexOf("!/");
- if(jarPathEndIndex < 0) {
- Activator.log.error("Impossible to find the jar path end", null);
- return null;
- }
- String jarPath = filePath.substring("file:".length(), jarPathEndIndex);
- ZipFile zipFile = new ZipFile(jarPath);
- filePath = filePath.substring(jarPathEndIndex + 2, filePath.length());
- ZipEntry entry = zipFile.getEntry(filePath);
- return zipFile.getInputStream(entry);
- // return new File(filePath);
- }
- }
+ Plugin plugin = new Plugin(bundle);
+ PluginEntry entry = plugin.getEntry(path);
+ return entry.getInputStream();
}
return null;
}
@@ -112,11 +90,13 @@ public class PluginPaletteProvider extends LocalPaletteProvider implements IProf
// parse the content of the file to discover the required
// profiles
// using safe computation
- XMLDefinitionPaletteParser profileParser = new XMLDefinitionPaletteParser(new XMLRequiredProfileFactory(requiredProfiles));
+ XMLPaletteDefinitionProfileInspector inspector = new XMLPaletteDefinitionProfileInspector();
+ XMLPaletteDefinitionWalker walker = new XMLPaletteDefinitionWalker(inspector);
for(int i = 0; i < contributions.getLength(); i++) {
Node node = contributions.item(i);
if(PALETTE_DEFINITION.equals(node.getNodeName())) {
- profileParser.parsePaletteDefinition(node);
+ walker.walk(node);
+ requiredProfiles.addAll(inspector.getRequiredProfiles());
}
}
} catch (Throwable e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java
index 01aa3267423..ed9b858fac0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteApplicator.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring
*
*****************************************************************************/
@@ -26,7 +27,9 @@ import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.PaletteSeparator;
import org.eclipse.gef.palette.PaletteStack;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.w3c.dom.Node;
@@ -34,40 +37,47 @@ import org.w3c.dom.Node;
* Standard implementation of the palette factory. This one should be use to
* provide palette content
*/
-public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFactory implements IPapyrusPaletteConstant {
-
- /** palette root for the palette to be built */
- protected PaletteRoot root;
-
- /** map of predefined entries */
- protected Map<String, PaletteEntry> predefinedEntries;
+public class XMLPaletteApplicator implements XMLPaletteDefinitionVisitor, IPapyrusPaletteConstant {
/**
+ * The diagram owning which palette is to be filled
+ */
+ private Diagram diagram;
+
+ /**
+ * Target palette to be filled
+ */
+ private PaletteRoot target;
+
+ /**
+ * Map of predefined entries
+ */
+ private Map<String, PaletteEntry> predefinedEntries;
+
+ /**
* Creates a new XMLDefinitionPaletteFactory
*
- * @param root
- * the palette root to fill
- * @param predefinedEntries
- * existing predefined entries
+ * @param diagram The diagram to provide for
+ * @param target The root of the palette to provide for
+ * @param predefinedEntries existing predefined entries
*/
- public XMLDefinitionPaletteFactory(PaletteRoot root, Map<String, PaletteEntry> predefinedEntries) {
- this.root = root;
+ public XMLPaletteApplicator(Diagram diagram, PaletteRoot target, Map<String, PaletteEntry> predefinedEntries) {
+ this.diagram = diagram;
+ this.target = target;
this.predefinedEntries = predefinedEntries;
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseContentNode(Node node) {
+ public void onContent(Node node) {
// nothing to do here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseDrawerNode(Node node) {
+ public void onDrawer(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
if(entry == null) {
@@ -82,7 +92,7 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
predefinedEntries.put(id, entry);
}
- appendPaletteEntry(root, predefinedEntries, computePath(node), entry);
+ appendPaletteEntry(computePath(node), entry);
}
/**
@@ -105,23 +115,21 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
/**
* {@inheritDoc}
*/
- @Override
- public void traverseSeparatorNode(Node node) {
+ public void onSeparator(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
if(entry == null) {
entry = new PaletteSeparator(id);
predefinedEntries.put(id, entry);
}
- appendPaletteEntry(root, predefinedEntries, computePath(node), entry);
+ appendPaletteEntry(computePath(node), entry);
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseStackNode(Node node) {
+ public void onStack(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
if(entry == null) {
@@ -130,24 +138,23 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
entry.setId(id);
predefinedEntries.put(id, entry);
}
- appendPaletteEntry(root, predefinedEntries, computePath(node), entry);
+ appendPaletteEntry(computePath(node), entry);
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseToolEntryNode(Node node) {
+ public void onToolEntry(Node node) {
String id = node.getAttributes().getNamedItem(ID).getNodeValue();
PaletteEntry entry = predefinedEntries.get(id);
- appendPaletteEntry(root, predefinedEntries, computePath(node), entry);
+ if (PolicyChecker.getCurrent().isInPalette(diagram, id))
+ appendPaletteEntry(computePath(node), entry);
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseAspectToolEntryNode(Node node) {
+ public void onAspectToolEntry(Node node) {
final String id = node.getAttributes().getNamedItem(ID).getNodeValue();
final String refToolID = node.getAttributes().getNamedItem(REF_TOOL_ID).getNodeValue();
@@ -189,24 +196,21 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
CombinedTemplateCreationEntry realEntry = new AspectCreationEntry(name, desc, id, iconDesc, entry, properties);
predefinedEntries.put(id, realEntry);
- appendPaletteEntry(root, predefinedEntries, computePath(node), realEntry);
+ if (PolicyChecker.getCurrent().isInPalette(diagram, id))
+ appendPaletteEntry(computePath(node), realEntry);
}
/**
* Appends the given palette entry to the appropriate location in either a
* predefined palette entry or the palette root.
*
- * @param root
- * @param predefinedEntries
- * map of predefined palette entries where the key is the palette
- * entry id and the value is the palette entry
* @param path
* @param paletteEntry
*/
- private static void appendPaletteEntry(PaletteRoot root, Map predefinedEntries, String path, PaletteEntry paletteEntry) {
- PaletteEntry fEntry = findPaletteEntry(root, path);
+ private void appendPaletteEntry(String path, PaletteEntry paletteEntry) {
+ PaletteEntry fEntry = findPaletteEntry(path);
if(fEntry == null) {
- fEntry = findPredefinedEntry(predefinedEntries, path);
+ fEntry = findPredefinedEntry(path);
}
if(fEntry == null) {
Activator.log.error("Invalid palette entry path: " + path, null);
@@ -222,33 +226,32 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
}
/**
- * Finds a palette container starting from the given root and using the
- * given path
+ * Finds a palette container using the given path
*
- * @param root
- * @param aPath
+ * @param path
* @return the container or <code>null</code> if not found
*/
- private static PaletteEntry findPaletteEntry(PaletteEntry root, String aPath) {
- StringTokenizer tokens = new StringTokenizer(aPath, "/"); //$NON-NLS-1$
+ private PaletteEntry findPaletteEntry(String path) {
+ PaletteEntry current = target;
+ StringTokenizer tokens = new StringTokenizer(path, "/"); //$NON-NLS-1$
while(tokens.hasMoreElements()) {
- if(root instanceof PaletteContainer)
- root = findChildPaletteEntry((PaletteContainer)root, tokens.nextToken());
+ if(current instanceof PaletteContainer)
+ current = findChildPaletteEntry((PaletteContainer)current, tokens.nextToken());
else
return null;
}
- return root;
+ return current;
}
/**
* Finds a palette entry starting from the given container and using the
* given path
*
- * @param root
- * @param path
+ * @param container
+ * @param childId
* @return the entry or <code>null</code> if not found
*/
- private static PaletteEntry findChildPaletteEntry(PaletteContainer container, String childId) {
+ private PaletteEntry findChildPaletteEntry(PaletteContainer container, String childId) {
Iterator entries = container.getChildren().iterator();
while(entries.hasNext()) {
PaletteEntry entry = (PaletteEntry)entries.next();
@@ -262,14 +265,11 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
* Searches the predefined entries for a palette entry given the full path
* as it was predefined.
*
- * @param predefinedEntries
- * map of predefined palette entries where the key is the palette
- * entry id and the value is the palette entry
* @param path
* the path to the palette entry starting as it was predefined
* @return the palette entry if one exists; null otherwise.
*/
- private static PaletteEntry findPredefinedEntry(Map predefinedEntries, String path) {
+ private PaletteEntry findPredefinedEntry(String path) {
StringTokenizer tokens = new StringTokenizer(path, "/"); //$NON-NLS-1$
PaletteEntry root = (PaletteEntry)predefinedEntries.get(tokens.nextToken());
@@ -289,7 +289,7 @@ public class XMLDefinitionPaletteFactory extends AbstractXMLDefinitionPaletteFac
* @param separator
* @param entry
*/
- private static void appendTo(PaletteSeparator separator, PaletteEntry entry) {
+ private void appendTo(PaletteSeparator separator, PaletteEntry entry) {
List children = separator.getParent().getChildren();
int index = children.indexOf(separator);
for(index++; index < children.size(); index++) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLRequiredProfileFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionProfileInspector.java
index 4e0940c594f..7877b17dc50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLRequiredProfileFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionProfileInspector.java
@@ -8,10 +8,13 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.service;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
import org.eclipse.papyrus.uml.diagram.common.Activator;
@@ -24,67 +27,66 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * Factory that collects all required profiles for the given palette
+ * Visitor of an XML palette definition that keeps track of the required profiles
*/
-public class XMLRequiredProfileFactory extends AbstractXMLDefinitionPaletteFactory implements IPapyrusPaletteConstant {
+public class XMLPaletteDefinitionProfileInspector implements XMLPaletteDefinitionVisitor, IPapyrusPaletteConstant {
- final protected Collection<String> requiredProfiles;
+ final private Collection<String> requiredProfiles;
/**
- * Creates a new XMLRequiredProfileFactory.
- *
- * @param requiredProfiles
- * list of required profiles to complete
+ * Gets the profiles required for the palette
+ * @return A collection of the required profiles
*/
- public XMLRequiredProfileFactory(Collection<String> requiredProfiles) {
- this.requiredProfiles = requiredProfiles;
+ public Collection<String> getRequiredProfiles() {
+ return requiredProfiles;
+ }
+
+ /**
+ * Initializes the inspector
+ */
+ public XMLPaletteDefinitionProfileInspector() {
+ this.requiredProfiles = new HashSet<String>();
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseContentNode(Node node) {
+ public void onContent(Node node) {
// nothing specific here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseDrawerNode(Node node) {
+ public void onDrawer(Node node) {
// nothing specific here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseToolEntryNode(Node node) {
+ public void onToolEntry(Node node) {
// nothing specific here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseStackNode(Node node) {
+ public void onStack(Node node) {
// nothing specific here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseSeparatorNode(Node node) {
+ public void onSeparator(Node node) {
// nothing specific here
}
/**
* {@inheritDoc}
*/
- @Override
- public void traverseAspectToolEntryNode(Node node) {
+ public void onAspectToolEntry(Node node) {
if(node.getChildNodes().getLength() > 0) {
NodeList children = node.getChildNodes();
for(int i = 0; i < children.getLength(); i++) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/AbstractXMLDefinitionPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionVisitor.java
index 9b0e4e7daa9..b023dba89e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/AbstractXMLDefinitionPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionVisitor.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring
*
*****************************************************************************/
@@ -16,9 +17,9 @@ package org.eclipse.papyrus.uml.diagram.common.service;
import org.w3c.dom.Node;
/**
- * Basic factory to create elements from the xml definition of the palette
+ * Represents a handler of events fired when walking through the XML definition of a palette
*/
-public abstract class AbstractXMLDefinitionPaletteFactory {
+public interface XMLPaletteDefinitionVisitor {
/**
* action when visiting a content node
@@ -26,7 +27,7 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseContentNode(Node node);
+ void onContent(Node node);
/**
* action when visiting a drawer node
@@ -34,7 +35,7 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseDrawerNode(Node node);
+ void onDrawer(Node node);
/**
* action when visiting a drawer node
@@ -42,7 +43,7 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseToolEntryNode(Node node);
+ void onToolEntry(Node node);
/**
* action when visiting a drawer node
@@ -50,7 +51,7 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseStackNode(Node node);
+ void onStack(Node node);
/**
* action when visiting a drawer node
@@ -58,7 +59,7 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseSeparatorNode(Node node);
+ void onSeparator(Node node);
/**
* action when visiting a aspect tool node
@@ -66,6 +67,6 @@ public abstract class AbstractXMLDefinitionPaletteFactory {
* @param node
* the node to visit
*/
- public abstract void traverseAspectToolEntryNode(Node node);
+ void onAspectToolEntry(Node node);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionWalker.java
index 3719c37bdda..eb43e98ca8a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLDefinitionPaletteParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/XMLPaletteDefinitionWalker.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring
*
*****************************************************************************/
@@ -17,22 +18,22 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * Parser for the local definition of palettes.
+ * Walks through the XML definition of a palette and fires events on nodes
*/
-public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
+public class XMLPaletteDefinitionWalker implements IPapyrusPaletteConstant {
- /** factory used to create elements from the parsed xml file */
- final protected AbstractXMLDefinitionPaletteFactory factory;
+ /**
+ * The handler for the walking events
+ */
+ final private XMLPaletteDefinitionVisitor handler;
/**
- * Create a new XMLDefinitionPaletteParser
+ * Initializes this walker
*
- * @param factory
- * the factory used to create elements from the parsing of the
- * xml file
+ * @param handler The handler to be used for the walking events
*/
- public XMLDefinitionPaletteParser(AbstractXMLDefinitionPaletteFactory factory) {
- this.factory = factory;
+ public XMLPaletteDefinitionWalker(XMLPaletteDefinitionVisitor handler) {
+ this.handler = handler;
}
/**
@@ -41,13 +42,13 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parsePaletteDefinition(Node paletteDefinitionNode) {
+ public void walk(Node paletteDefinitionNode) {
NodeList nodes = paletteDefinitionNode.getChildNodes();
for(int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
if(CONTENT.equals(node.getNodeName())) {
- factory.traverseContentNode(node);
- parsePaletteContent(node);
+ handler.onContent(node);
+ walkContentNode(node);
}
}
}
@@ -57,24 +58,22 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
*
* @param node
* the node to parse
- * @param root
- * the palette root to fill
*/
- public void parsePaletteContent(Node paletteContentNode) {
+ private void walkContentNode(Node paletteContentNode) {
NodeList nodes = paletteContentNode.getChildNodes();
for(int i = 0; i < nodes.getLength(); i++) {
Node node = nodes.item(i);
String name = node.getNodeName();
if(DRAWER.equals(name)) {
- parserDrawerNode(node);
+ walkDrawerNode(node);
} else if(STACK.equals(name)) {
- parserStackNode(node);
+ walkStackNode(node);
} else if(SEPARATOR.equals(name)) {
- parseSeparatorNode(node);
+ walkSeparatorNode(node);
} else if(TOOL.equals(name)) {
- parseToolNode(node);
+ walkToolNode(node);
} else if(ASPECT_TOOL.equals(name)) {
- parseAspectToolNode(node);
+ walkAspectToolNode(node);
}
}
@@ -86,8 +85,8 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parseAspectToolNode(Node node) {
- factory.traverseAspectToolEntryNode(node);
+ private void walkAspectToolNode(Node node) {
+ handler.onAspectToolEntry(node);
}
/**
@@ -96,12 +95,11 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parserDrawerNode(Node node) {
- factory.traverseDrawerNode(node);
+ private void walkDrawerNode(Node node) {
+ handler.onDrawer(node);
if(node.getChildNodes().getLength() > 0) {
- parsePaletteContent(node);
+ walkContentNode(node);
}
- // return entry;
}
/**
@@ -110,11 +108,10 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parserStackNode(Node node) {
- factory.traverseStackNode(node);
-
+ private void walkStackNode(Node node) {
+ handler.onStack(node);
if(node.getChildNodes().getLength() > 0) {
- parsePaletteContent(node);
+ walkContentNode(node);
}
}
@@ -124,11 +121,10 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parseToolNode(Node node) {
- factory.traverseToolEntryNode(node);
-
+ private void walkToolNode(Node node) {
+ handler.onToolEntry(node);
if(node.getChildNodes().getLength() > 0) {
- parsePaletteContent(node);
+ walkContentNode(node);
}
}
@@ -138,11 +134,10 @@ public class XMLDefinitionPaletteParser implements IPapyrusPaletteConstant {
* @param node
* the node to parse
*/
- public void parseSeparatorNode(Node node) {
- factory.traverseSeparatorNode(node);
-
+ private void walkSeparatorNode(Node node) {
+ handler.onSeparator(node);
if(node.getChildNodes().getLength() > 0) {
- parsePaletteContent(node);
+ walkContentNode(node);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
index 84bd5b5bd44..9511803f965 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF
@@ -46,7 +46,9 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0"
+ org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramCreationCondition.java
index 57605a7ad56..a426d79461c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CommunicationDiagramCreationCondition.java
@@ -16,7 +16,6 @@ package org.eclipse.papyrus.uml.diagram.communication;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Interaction;
// TODO: Auto-generated Javadoc
/**
@@ -32,9 +31,6 @@ public class CommunicationDiagramCreationCondition extends PerspectiveContextDep
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof Interaction;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CreateCommunicationDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CreateCommunicationDiagramWithNavigationHandler.java
deleted file mode 100644
index 2077dec0826..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/CreateCommunicationDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.communication;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateCommunicationDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateCommunicationDiagramWithNavigationHandler() {
- super(new CreateCommunicationDiagramCommand(), new CommunicationDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomDurationObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomDurationObservationCreateCommandCN.java
index 14da8c7207c..26c202d59b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomDurationObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomDurationObservationCreateCommandCN.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.DurationObservationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationObservation;
@@ -38,8 +39,8 @@ public class CustomDurationObservationCreateCommandCN extends DurationObservatio
*
* @param req
*/
- public CustomDurationObservationCreateCommandCN(CreateElementRequest req) {
- super(req);
+ public CustomDurationObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomTimeObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomTimeObservationCreateCommandCN.java
index e808e37c86f..16c154f8b7b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomTimeObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/commands/CustomTimeObservationCreateCommandCN.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.TimeObservationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
@@ -37,8 +38,8 @@ public class CustomTimeObservationCreateCommandCN extends TimeObservationCreateC
*
* @param req
*/
- public CustomTimeObservationCreateCommandCN(CreateElementRequest req) {
- super(req);
+ public CustomTimeObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomInteractionCompartmentSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomInteractionCompartmentSemanticEditPolicy.java
index dbffd5eeb94..3f64ffdf31a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomInteractionCompartmentSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/policies/itemsemantic/CustomInteractionCompartmentSemanticEditPolicy.java
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.uml.diagram.communication.custom.policies.itemsemant
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomDurationObservationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.custom.commands.CustomTimeObservationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.policies.InteractionCompartmentItemSemanticEditPolicy;
@@ -35,10 +36,10 @@ public class CustomInteractionCompartmentSemanticEditPolicy extends InteractionC
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.TimeObservation_8006 == req.getElementType()) {
- return getGEFWrapper(new CustomTimeObservationCreateCommandCN(req));
+ return getGEFWrapper(new CustomTimeObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_8007 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
index ed621d16703..5be22933d29 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/plugin.xml
@@ -26,69 +26,7 @@
</command>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
-<extension
- point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand"
- icon="icons/obj16/Diagram_Communication.gif"
- label="Create a new Communication Diagram"
- style="push"
- tooltip="Create a new Communication Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand"
- icon="icons/obj16/Diagram_Communication.gif"
- label="Create a new Communication Diagram"
- style="push"
- tooltip="Create a new Communication Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.communication.CreateCommunicationDiagramCommand"
- icon="icons/obj16/Diagram_Communication.gif"
- label="Create a new Communication Diagram"
- style="push"
- tooltip="Create a new Communication Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
index 44c8f04a2e8..b7b70e54e4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/CommentCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_8005(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
index 1da79108539..0e3e7d4b3df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_8004(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
index 0ccce5dc9c1..91f9b748a66 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/DurationObservationCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DurationObservationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DurationObservationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationObservationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DurationObservationCreateCommandCN(req, eObject);
+ public static DurationObservationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationObservationCreateCommandCN(CreateElementRequest req) {
+ public DurationObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationObservation_8007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
index 980d156ff98..220e558fbcf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/InteractionCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class InteractionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class InteractionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionCreateCommand(req, eObject);
+ public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCreateCommand(CreateElementRequest req) {
+ public InteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +94,9 @@ public class InteractionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
@@ -97,8 +104,19 @@ public class InteractionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Component childHolder = (Component)getElementToEdit();
childHolder.getPackagedElements().add(newElement);
ElementInitializers.getInstance().init_Interaction_8002(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
index a1d60b9a224..6badaf413ae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/LifelineCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public LifelineCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public LifelineCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LifelineCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new LifelineCreateCommandCN(req, eObject);
+ public static LifelineCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LifelineCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public LifelineCreateCommandCN(CreateElementRequest req) {
+ public LifelineCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class LifelineCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class LifelineCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getLifelines().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getLifelines().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Lifeline_8001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
index 1e31753c902..dac46b1d016 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/ShortCutDiagramCreateCommand.java
@@ -37,7 +37,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +47,25 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShortCutDiagramCreateCommand(req, eObject);
+ public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShortCutDiagramCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
index 88b2513e141..5bb09c2214b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/commands/TimeObservationCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.communication.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeObservation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public TimeObservationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public TimeObservationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeObservationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new TimeObservationCreateCommandCN(req, eObject);
+ public static TimeObservationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeObservationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeObservationCreateCommandCN(CreateElementRequest req) {
+ public TimeObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class TimeObservationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class TimeObservationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeObservation_8006(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionCompartmentItemSemanticEditPolicy.java
index 82015493283..4c9ca2e1d58 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/InteractionCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.DurationObservationCreateCommandCN;
@@ -61,31 +62,31 @@ public class InteractionCompartmentItemSemanticEditPolicy extends UMLBaseItemSem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LifelineCreateCommandCN(req));
+ return getGEFWrapper(new LifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_8005 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_8004 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_8006 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommandCN(req));
+ return getGEFWrapper(new TimeObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_8007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new DurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
index e1a85fe1964..1ce2f7cbd25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/ModelCanonicalEditPolicy.java
@@ -41,6 +41,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.ConstraintEditPartCN;
import org.eclipse.papyrus.uml.diagram.communication.edit.parts.DurationObservationEditPartCN;
@@ -191,7 +192,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
* @generated
*/
private Collection<IAdaptable> refreshConnections() {
- Map<EObject, View> domain2NotationMap = new HashMap<EObject, View>();
+ Domain2Notation domain2NotationMap = new Domain2Notation();
Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
Collection existingLinks = new LinkedList(getDiagram().getEdges());
for(Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
@@ -222,7 +223,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Collection<UMLLinkDescriptor> collectAllLinks(View view, Map<EObject, View> domain2NotationMap) {
+ private Collection<UMLLinkDescriptor> collectAllLinks(View view, Domain2Notation domain2NotationMap) {
if(!ModelEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
return Collections.emptyList();
}
@@ -233,9 +234,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPackage_1000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case InteractionEditPart.VISUAL_ID:
@@ -243,9 +242,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getInteraction_8002ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case ShortCutDiagramEditPart.VISUAL_ID:
@@ -253,9 +250,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getDiagram_8016ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case LifelineEditPartCN.VISUAL_ID:
@@ -263,9 +258,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getLifeline_8001ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case ConstraintEditPartCN.VISUAL_ID:
@@ -273,9 +266,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getConstraint_8004ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case CommentEditPartCN.VISUAL_ID:
@@ -283,9 +274,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getComment_8005ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case TimeObservationEditPartCN.VISUAL_ID:
@@ -293,9 +282,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getTimeObservation_8006ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case DurationObservationEditPartCN.VISUAL_ID:
@@ -303,9 +290,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getDurationObservation_8007ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case MessageEditPart.VISUAL_ID:
@@ -313,9 +298,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getMessage_8009ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
}
@@ -331,11 +314,11 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Map<EObject, View> domain2NotationMap) {
+ private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for(UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
- EditPart sourceEditPart = getEditPart(nextLinkDescriptor.getSource(), domain2NotationMap);
- EditPart targetEditPart = getEditPart(nextLinkDescriptor.getDestination(), domain2NotationMap);
+ EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
+ EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if(sourceEditPart == null || targetEditPart == null) {
continue;
}
@@ -361,7 +344,7 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private EditPart getEditPart(EObject domainModelElement, Map<EObject, View> domain2NotationMap) {
+ private EditPart getEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap) {
View view = (View)domain2NotationMap.get(domainModelElement);
if(view != null) {
return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
@@ -375,4 +358,59 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
private Diagram getDiagram() {
return ((View)getHost().getModel()).getDiagram();
}
+
+ /**
+ * @generated
+ */
+ private EditPart getSourceEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getSource(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getTargetEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getDestination(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap, int hintVisualId) {
+ View view = (View)domain2NotationMap.getHinted(domainModelElement, UMLVisualIDRegistry.getType(hintVisualId));
+ if(view != null) {
+ return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @SuppressWarnings("serial")
+ protected static class Domain2Notation extends HashMap<EObject, View> {
+
+ /**
+ * @generated
+ */
+ public boolean containsDomainElement(EObject domainElement) {
+ return this.containsKey(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ public View getHinted(EObject domainEObject, String hint) {
+ return this.get(domainEObject);
+ }
+
+ /**
+ * @generated
+ */
+ public void putView(EObject domainElement, View view) {
+ if(!containsKey(view.getElement())) {
+ this.put(domainElement, view);
+ }
+ }
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java
index 6ee3940938b..d11b0f9de0f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/edit/policies/PackageItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.InteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.communication.edit.commands.ShortCutDiagramCreateCommand;
@@ -63,13 +64,13 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCreateCommand(req));
+ return getGEFWrapper(new InteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Diagram_8016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShortCutDiagramCreateCommand(req));
+ return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
index 5a76a3e47f3..dd5181f3002 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF
@@ -60,7 +60,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
org.eclipse.papyrus.uml.diagram.menu;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0"
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/ComponentDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/ComponentDiagramCreationCondition.java
index 78355864205..4513d2660b2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/ComponentDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/ComponentDiagramCreationCondition.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.component;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Component;
/**
* ComponentDiagramCreationCondition class allows to check if a Component diagram can be added to the
@@ -24,11 +23,7 @@ public class ComponentDiagramCreationCondition extends PerspectiveContextDepende
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package || selectedElement instanceof Component;
- }
return false;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/CreateComponentDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/CreateComponentDiagramWithNavigationHandler.java
deleted file mode 100644
index 67f6f530eaf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/CreateComponentDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.component;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateComponentDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateComponentDiagramWithNavigationHandler() {
- super(new CreateComponentDiagramCommand(), new ComponentDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/command/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/command/PortCreateCommand.java
index 03c882bdb54..beafe3b7254 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/command/PortCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/command/PortCreateCommand.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.Property;
@@ -32,8 +33,8 @@ import org.eclipse.uml2.uml.UMLFactory;
public class PortCreateCommand extends org.eclipse.papyrus.uml.diagram.component.edit.commands.PortCreateCommand {
/** Constructor **/
- public PortCreateCommand(CreateElementRequest req) {
- super(req);
+ public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/itemsemantic/PropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/itemsemantic/PropertyPartItemSemanticEditPolicyCN.java
index a911fec83c6..61d732a7841 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/itemsemantic/PropertyPartItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/custom/edit/policies/itemsemantic/PropertyPartItemSemanticEditPolicyCN.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.component.custom.edit.command.ConnectorCreateCommand;
@@ -51,7 +52,7 @@ public class PropertyPartItemSemanticEditPolicyCN extends org.eclipse.papyrus.um
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes.Port_3069 == req.getElementType()) {
- return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.component.custom.command.PortCreateCommand(req));
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.component.custom.command.PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
index b0206b46ec9..469f4280c84 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/plugin.xml
@@ -117,74 +117,6 @@
</command>
</extension>
<extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.component.CreateComponentDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.component.CreateComponentDiagramCommand">
- <activeWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.component.CreateComponentDiagramCommand"
- icon="icons/obj16/ComponentDiagram.gif"
- label="Create a new Component Diagram"
- style="push"
- tooltip="Create a new Component Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel">
- </reference>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.component.CreateComponentDiagramCommand"
- icon="icons/obj16/ComponentDiagram.gif"
- label="Create a new Component Diagram"
- style="push"
- tooltip="Create a new Component Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel">
- </reference>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.component.CreateComponentDiagramCommand"
- icon="icons/obj16/ComponentDiagram.gif"
- label="Create a new Component Diagram"
- style="push"
- tooltip="Create a new Component Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- </extension>
- <extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
<editorDiagram
actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java
index 2ad93c96a65..16639cbe345 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommand.java
@@ -23,12 +23,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3201(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java
index 1a7cc517567..afec170dc02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/CommentCreateCommandPCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class CommentCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class CommentCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandPCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandPCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandPCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandPCN(req, eObject);
+ public static CommentCreateCommandPCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandPCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandPCN(CreateElementRequest req) {
+ public CommentCreateCommandPCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class CommentCreateCommandPCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class CommentCreateCommandPCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3074(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
index 438bf73bdb3..04800087280 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ComponentCreateCommand(req, eObject);
+ public static ComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCreateCommand(CreateElementRequest req) {
+ public ComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,11 +92,9 @@ public class ComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -99,8 +102,19 @@ public class ComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_2002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
index b9d914ae021..7a6d493b9a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandCN.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class ComponentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class ComponentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ComponentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ComponentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ComponentCreateCommandCN(req, eObject);
+ public static ComponentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCreateCommandCN(CreateElementRequest req) {
+ public ComponentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class ComponentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class ComponentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Component owner = (Component)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Component qualifiedTarget = (Component)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3070(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
index 14a8d5f50ab..02023e802f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ComponentCreateCommandPCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ComponentCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ComponentCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- public ComponentCreateCommandPCN(CreateElementRequest req, EObject eObject) {
+ public ComponentCreateCommandPCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCreateCommandPCN create(CreateElementRequest req, EObject eObject) {
- return new ComponentCreateCommandPCN(req, eObject);
+ public static ComponentCreateCommandPCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCreateCommandPCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCreateCommandPCN(CreateElementRequest req) {
+ public ComponentCreateCommandPCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ComponentCreateCommandPCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ComponentCreateCommandPCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3071(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
index e2f9a22b157..e58602981fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommand.java
@@ -23,12 +23,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3199(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
index 950f4f52fdb..951b32bdb06 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ConstraintCreateCommandPCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ConstraintCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ConstraintCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandPCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandPCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandPCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandPCN(req, eObject);
+ public static ConstraintCreateCommandPCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandPCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandPCN(CreateElementRequest req) {
+ public ConstraintCreateCommandPCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ConstraintCreateCommandPCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ConstraintCreateCommandPCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3075(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
index 4d65f4b345c..a497eb61351 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DefaultNamedElementCreateCommand.java
@@ -23,9 +23,13 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -35,7 +39,7 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -45,24 +49,25 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DefaultNamedElementCreateCommand(req, eObject);
+ public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DefaultNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -85,11 +90,9 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
index a72dd4895a9..815587c8406 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/DependencyNodeCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DependencyNodeCreateCommand(req, eObject);
+ public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DependencyNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,11 +91,9 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
+ return data.isPermitted();
}
/**
@@ -98,8 +101,19 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
index 02b8ca9b591..3a9d86ace25 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommand.java
@@ -23,11 +23,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +42,7 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +52,25 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommand(req, eObject);
+ public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req) {
+ public InterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +93,9 @@ public class InterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +103,19 @@ public class InterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3078(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
index 4932dbb6c6c..66affeab429 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/InterfaceCreateCommandPCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InterfaceCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InterfaceCreateCommandPCN extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommandPCN(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommandPCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommandPCN create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommandPCN(req, eObject);
+ public static InterfaceCreateCommandPCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommandPCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommandPCN(CreateElementRequest req) {
+ public InterfaceCreateCommandPCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InterfaceCreateCommandPCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class InterfaceCreateCommandPCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3072(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java
index 20544ba5c8a..2c5b58850fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommand(req, eObject);
+ public static ModelCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommand(CreateElementRequest req) {
+ public ModelCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,11 +92,9 @@ public class ModelCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -99,8 +102,19 @@ public class ModelCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_3202(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java
index 533dca5741f..aa04bf4eddb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ModelCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandCN(req, eObject);
+ public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req) {
+ public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ModelCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_3077(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
index 05f34a79613..4f7b2242c50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/OperationForInterfaceCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OperationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OperationForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OperationForInterfaceCreateCommand(req, eObject);
+ public static OperationForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationForInterfaceCreateCommand(CreateElementRequest req) {
+ public OperationForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class OperationForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_5(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java
index 0eacbbec62c..7a272833ffe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommand(req, eObject);
+ public static PackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req) {
+ public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,11 +91,9 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -98,8 +101,19 @@ public class PackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_3200(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java
index 9cbdbe82369..fa2cbbb21da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PackageCreateCommandCN.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandCN(req, eObject);
+ public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req) {
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -86,7 +91,9 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -94,8 +101,19 @@ public class PackageCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_3076(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
index c766a8af7de..ca0f8c7d2c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PortCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PortCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PortCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PortCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PortCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PortCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PortCreateCommand(req, eObject);
+ public static PortCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PortCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PortCreateCommand(CreateElementRequest req) {
+ public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PortCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPort());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PortCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Port newElement = UMLFactory.eINSTANCE.createPort();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Port_3069(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
index f52dbd6f352..83eee5f02e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyCreateCommand.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class PropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class PropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyCreateCommand(req, eObject);
+ public static PropertyCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyCreateCommand(CreateElementRequest req) {
+ public PropertyCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -78,7 +83,9 @@ public class PropertyCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -86,8 +93,19 @@ public class PropertyCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3079(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
index 5b6adc4aaa0..3c91cc58b56 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/PropertyForInterfaceCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PropertyForInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PropertyForInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PropertyForInterfaceCreateCommand(req, eObject);
+ public static PropertyForInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyForInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyForInterfaceCreateCommand(CreateElementRequest req) {
+ public PropertyForInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PropertyForInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_1(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
index f6e8d707c73..faf25af41ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/ReceptionInInterfaceCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ReceptionInInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ReceptionInInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReceptionInInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ReceptionInInterfaceCreateCommand(req, eObject);
+ public static ReceptionInInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReceptionInInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ReceptionInInterfaceCreateCommand(CreateElementRequest req) {
+ public ReceptionInInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReception());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ReceptionInInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Reception newElement = UMLFactory.eINSTANCE.createReception();
- Interface owner = (Interface)getElementToEdit();
- owner.getOwnedReceptions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interface qualifiedTarget = (Interface)target;
+ qualifiedTarget.getOwnedReceptions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Reception_6(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
index 288e4757be6..8111a9b85e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/commands/RectangleInterfaceCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.component.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class RectangleInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class RectangleInterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public RectangleInterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public RectangleInterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static RectangleInterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new RectangleInterfaceCreateCommand(req, eObject);
+ public static RectangleInterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new RectangleInterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public RectangleInterfaceCreateCommand(CreateElementRequest req) {
+ public RectangleInterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class RectangleInterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class RectangleInterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3205(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
index 473de7eaf50..d31d6709f2c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -68,13 +69,13 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyCreateCommand(req));
+ return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
index be548445f52..2959bcd5075 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -68,13 +69,13 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyCreateCommand(req));
+ return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java
index b205d5452e7..1101e151b4b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyPCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -68,13 +69,13 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicyPCN extends UMLB
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyCreateCommand(req));
+ return getGEFWrapper(new PropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java
index 8330303e218..f28e83803dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentDiagramItemSemanticEditPolicy.java
@@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommand;
@@ -79,55 +80,55 @@ public class ComponentDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DependencyNodeCreateCommand(req));
+ return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_2002 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommand(req));
+ return getGEFWrapper(new ComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3202 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommand(req));
+ return getGEFWrapper(new ModelCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3200 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommand(req));
+ return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3205 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RectangleInterfaceCreateCommand(req));
+ return getGEFWrapper(new RectangleInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3201 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3199 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_3204 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DefaultNamedElementCreateCommand(req));
+ return getGEFWrapper(new DefaultNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2003 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java
index d34afba5f3d..96880c59773 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
@@ -100,7 +101,7 @@ public class ComponentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java
index e4e36c74826..6d29a15bcb1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
@@ -100,7 +101,7 @@ public class ComponentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java
index dc3c384f216..56be47a17a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ComponentItemSemanticEditPolicyPCN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
@@ -100,7 +101,7 @@ public class ComponentItemSemanticEditPolicyPCN extends UMLBaseItemSemanticEditP
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
index 16b2906acbc..5c435c53bfb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class InterfaceAttributeCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req));
+ return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
index 57a380c06e2..8c4592e2c59 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.PropertyForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -47,7 +48,7 @@ public class InterfaceAttributeCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyForInterfaceCreateCommand(req));
+ return getGEFWrapper(new PropertyForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
index bc66d096333..557c72abc3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
index e0502859da2..e4e10beb54c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.OperationForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ReceptionInInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -58,13 +59,13 @@ public class InterfaceOperationCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_6 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req));
+ return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
index 30f55bc324c..804c1d15e54 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/InterfaceOperationCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.OperationForInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ReceptionInInterfaceCreateCommand;
import org.eclipse.papyrus.uml.diagram.component.providers.UMLElementTypes;
@@ -48,13 +49,13 @@ public class InterfaceOperationCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationForInterfaceCreateCommand(req));
+ return getGEFWrapper(new OperationForInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Reception_6 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req));
+ return getGEFWrapper(new ReceptionInInterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
index de3e2087dc7..16f1f7544f3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
@@ -62,43 +63,43 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicy extends UM
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandPCN(req));
+ return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandPCN(req));
+ return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandPCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandPCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index 34535e0c50f..eac327dc776 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
@@ -62,43 +63,43 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandPCN(req));
+ return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandPCN(req));
+ return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandPCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandPCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index 6bd24b31d6e..d749951a36d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
@@ -73,43 +74,43 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandPCN(req));
+ return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandPCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandPCN(req));
+ return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandPCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index d5fee615eb8..420a1f553a5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.CommentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ComponentCreateCommandPCN;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.ConstraintCreateCommandPCN;
@@ -62,43 +63,43 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCreateCommandPCN(req));
+ return getGEFWrapper(new ComponentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandPCN(req));
+ return getGEFWrapper(new CommentCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandPCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandPCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandPCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
index 904d15e34f1..c7aae5140f3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/PropertyItemSemanticEditPolicy.java
@@ -39,6 +39,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.component.edit.commands.AbstractionCreateCommand;
@@ -105,7 +106,7 @@ public class PropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -361,25 +362,7 @@ public class PropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
- ICommand reorientCommand =null;
switch(getVisualID(req)) {
- case org.eclipse.papyrus.uml.diagram.component.edit.parts.ConnectorEditPart.VISUAL_ID:
- if(provider == null) {
- return UnexecutableCommand.INSTANCE;
- }
-
- // Add graphical new end View in request parameters
- View targetView = (View)getHost().getModel();
- req.setParameter(RequestParameterConstants.EDGE_REORIENT_REQUEST_END_VIEW, targetView);
-
- // Retrieve re-orient command from the Element Edit service
- reorientCommand = provider.getEditCommand(req);
- if(reorientCommand == null) {
- return UnexecutableCommand.INSTANCE;
- }
- return getGEFWrapper(reorientCommand.reduce());
-
case UsageEditPart.VISUAL_ID:
case InterfaceRealizationEditPart.VISUAL_ID:
case SubstitutionEditPart.VISUAL_ID:
@@ -388,12 +371,12 @@ public class PropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
case AbstractionEditPart.VISUAL_ID:
case DependencyEditPart.VISUAL_ID:
case DependencyBranchEditPart.VISUAL_ID:
-
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(req.getRelationship());
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve re-orient command from the Element Edit service
- reorientCommand = provider.getEditCommand(req);
+ ICommand reorientCommand = provider.getEditCommand(req);
if(reorientCommand == null) {
return UnexecutableCommand.INSTANCE;
}
@@ -417,5 +400,4 @@ public class PropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 03df5d81052..6ccb7b8c931 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -304,20 +304,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getCreateCommand(CreateElementRequest req) {
// no more usage of the extended types here.
- IElementType requestElementType = req.getElementType();
- if (requestElementType instanceof IExtendedHintedElementType) {
- IExtendedHintedElementType extendedElementType = (IExtendedHintedElementType) requestElementType;
-
- // try to get a semantic create command from the extended type
- IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
- if (commandProvider != null) {
- ICommand command = commandProvider.getEditCommand(req);
- if (command != null && command.canExecute()) {
- return new ICommandProxy(command);
- }
- }
- }
-
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
index 0b694f6d6b3..5e0c12c194c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src/org/eclipse/papyrus/uml/diagram/component/part/UMLVisualIDRegistry.java
@@ -168,16 +168,7 @@ public class UMLVisualIDRegistry {
* @generated not
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return ComponentDiagramEditPart.VISUAL_ID;
- }
- if(UMLPackage.eINSTANCE.getComponent().isSuperTypeOf(domainElement.eClass())) {
- return ComponentDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return ComponentDiagramEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
index 0035ce00726..b4e6e6f9196 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF
@@ -69,13 +69,12 @@ Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.gef,
org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0"
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.part.UMLDi
- agramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite;singlet
- on:=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.composite; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CompositeDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CompositeDiagramCreationCondition.java
index 8e0e3458b8a..755749a612c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CompositeDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CompositeDiagramCreationCondition.java
@@ -15,7 +15,6 @@ package org.eclipse.papyrus.uml.diagram.composite;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Collaboration;
/**
* CompositeDiagramCreationCondition class allows to check if a Composite diagram can be added to the
@@ -27,9 +26,6 @@ public class CompositeDiagramCreationCondition extends PerspectiveContextDepende
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package || selectedElement instanceof org.eclipse.uml2.uml.Class || selectedElement instanceof Collaboration;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java
index 9b23ea680f3..663d37fdccc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramCommand.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.uml.diagram.composite.edit.parts.CompositeStructureDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.composite.part.UMLDiagramEditorPlugin;
import org.eclipse.uml2.uml.Collaboration;
@@ -54,7 +55,7 @@ public class CreateCompositeDiagramCommand extends AbstractPapyrusGmfCreateDiagr
* Name of the Diagram
*/
protected static final String CSD_DEFAULT_NAME = "CompositeDiagram"; //$NON-NLS-1$
-
+
/**
* {@inheritDoc}
*/
@@ -99,17 +100,17 @@ public class CreateCompositeDiagramCommand extends AbstractPapyrusGmfCreateDiagr
* {@inheritDoc}
*/
@Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
+ protected Diagram doCreateDiagram(Resource diagramResource, EObject owner, EObject element, ViewPrototype prototype, String name) {
Diagram diagram = null;
- if(owner instanceof org.eclipse.uml2.uml.Class || (owner instanceof Collaboration)) {
- canvasDomainElement = (EObject)owner;
- Package owningPackage = ((Element)owner).getNearestPackage();
- diagram = super.createDiagram(diagramResource, owningPackage, name);
+ if(element instanceof org.eclipse.uml2.uml.Class || (element instanceof Collaboration)) {
+ canvasDomainElement = (EObject)element;
+ Package owningPackage = ((Element)element).getNearestPackage();
+ diagram = super.doCreateDiagram(diagramResource, owner, owningPackage, prototype, name);
- } else if(owner instanceof Package) {
+ } else if(element instanceof Package) {
canvasDomainElement = null;
- diagram = super.createDiagram(diagramResource, owner, name);
+ diagram = super.doCreateDiagram(diagramResource, owner, element, prototype, name);
}
return diagram;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramWithNavigationHandler.java
deleted file mode 100644
index 85b15880bae..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/CreateCompositeDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009-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:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.composite;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateCompositeDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateCompositeDiagramWithNavigationHandler() {
- super(new CreateCompositeDiagramCommand(), new CompositeDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java
index c1a12f94af0..65abb920576 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/CollaborationRoleCreateCommand.java
@@ -23,6 +23,8 @@ import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.composite.custom.messages.Messages;
import org.eclipse.papyrus.uml.diagram.composite.custom.ui.CollaborationRoleValidator;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
@@ -49,8 +51,8 @@ public class CollaborationRoleCreateCommand extends CollaborationRoleCreateComma
* @param req
* the creation request
*/
- public CollaborationRoleCreateCommand(CreateElementRequest req) {
- super(req);
+ public CollaborationRoleCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
@@ -61,8 +63,8 @@ public class CollaborationRoleCreateCommand extends CollaborationRoleCreateComma
* @param eObject
* the element to edit
*/
- public CollaborationRoleCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CollaborationRoleCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -74,8 +76,8 @@ public class CollaborationRoleCreateCommand extends CollaborationRoleCreateComma
* the element to edit
* @return the new creation command for CollaborationRole
*/
- public static CollaborationRoleCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CollaborationRoleCreateCommand(req, eObject);
+ public static CollaborationRoleCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationRoleCreateCommand(req, eObject, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PortCreateCommand.java
index 0e1990e6e19..3c2262d9b3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PortCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PortCreateCommand.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.Property;
@@ -32,8 +33,8 @@ import org.eclipse.uml2.uml.UMLFactory;
public class PortCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.PortCreateCommand {
/** Constructor **/
- public PortCreateCommand(CreateElementRequest req) {
- super(req);
+ public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java
index f392ae4b55b..531aee7a7c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartCreateCommand.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
@@ -26,8 +27,8 @@ import org.eclipse.uml2.uml.UMLFactory;
public class PropertyPartCreateCommand extends org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN {
/** Constructor **/
- public PropertyPartCreateCommand(CreateElementRequest req) {
- super(req);
+ public PropertyPartCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
index 59d93e76318..182ce4b96c3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.CollaborationRoleCreateCommand;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -37,7 +38,7 @@ public class CollaborationCompositeCompartmentItemSemanticEditPolicy extends org
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ConnectableElement_3115 == req.getElementType()) {
- return getGEFWrapper(new CollaborationRoleCreateCommand(req));
+ return getGEFWrapper(new CollaborationRoleCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
index c563f2eedd0..c42dc853dd7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.composite.custom.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.PropertyPartCreateCommand;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -38,7 +39,7 @@ public class PropertyPartCompartmentItemSemanticEditPolicyCN extends org.eclipse
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.Property_3070 == req.getElementType()) {
- return getGEFWrapper(new PropertyPartCreateCommand(req));
+ return getGEFWrapper(new PropertyPartCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
index 228f406855f..a1fd27518e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.custom.edit.command.ConnectorCreateCommand;
@@ -53,7 +54,7 @@ public class PropertyPartItemSemanticEditPolicyCN extends org.eclipse.papyrus.um
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.Port_3069 == req.getElementType()) {
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
index ca319e79822..9ccccb0d499 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/plugin.xml
@@ -1583,51 +1583,6 @@
</creationCommand>
</extension>
-<extension
- point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram"
- icon="icons/obj16/Diagram_CompositeStructure.gif"
- label="Create a new Composite Structure Diagram"
- style="push"
- tooltip="Create a new Composite Structure Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram"
- icon="icons/obj16/Diagram_CompositeStructure.gif"
- label="Create a new Composite Structure Diagram"
- style="push"
- tooltip="Create a new Composite Structure Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram"
- icon="icons/obj16/Diagram_CompositeStructure.gif"
- label="Create a new Composite Structure Diagram"
- style="push"
- tooltip="Create a new Composite Structure Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
<extension
point="org.eclipse.ui.commands">
@@ -1637,23 +1592,6 @@
id="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram"
name="Create a new Composite Structure Diagram">
</command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.composite.CreateCompositeDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.composite.createCompositeDiagram">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
</extension><extension point="org.eclipse.ui.menus" id="context-menus">
<?gmfgen generated="true"?>
<!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java
index 08d4ef87ee4..dea43095eeb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActivityCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActivityCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActivityCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActivityCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActivityCompositeCreateCommand(req, eObject);
+ public static ActivityCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityCompositeCreateCommand(CreateElementRequest req) {
+ public ActivityCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ActivityCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ActivityCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Activity newElement = UMLFactory.eINSTANCE.createActivity();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Activity_2060(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java
index 47e3e0e1fc7..7d38c2c5379 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ActivityCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ActivityCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ActivityCompositeCreateCommandCN(req, eObject);
+ public static ActivityCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityCompositeCreateCommandCN(CreateElementRequest req) {
+ public ActivityCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActivityCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Activity newElement = UMLFactory.eINSTANCE.createActivity();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Activity_3072(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCreateCommandCLN.java
index 82fcb35bfb2..cb188242089 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActivityCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Activity;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActivityCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActivityCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public ActivityCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public ActivityCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActivityCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new ActivityCreateCommandCLN(req, eObject);
+ public static ActivityCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActivityCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActivityCreateCommandCLN(CreateElementRequest req) {
+ public ActivityCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActivityCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActivity());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActivityCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Activity newElement = UMLFactory.eINSTANCE.createActivity();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Activity_3103(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java
index 7a3d84eae28..79c89f4c907 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActorCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActorCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActorCreateCommand(req, eObject);
+ public static ActorCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorCreateCommand(CreateElementRequest req) {
+ public ActorCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ActorCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ActorCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_2077(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java
index 93f20c23c9c..be4c0822937 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ActorCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ActorCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ActorCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ActorCreateCommandCN(req, eObject);
+ public static ActorCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorCreateCommandCN(CreateElementRequest req) {
+ public ActorCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActorCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActorCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_3091(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java
index f6b1ec264a5..771b28cf3e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/AnyReceiveEventCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.AnyReceiveEvent;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AnyReceiveEventCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AnyReceiveEventCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AnyReceiveEventCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AnyReceiveEventCreateCommand(req, eObject);
+ public static AnyReceiveEventCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AnyReceiveEventCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AnyReceiveEventCreateCommand(CreateElementRequest req) {
+ public AnyReceiveEventCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAnyReceiveEvent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class AnyReceiveEventCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
AnyReceiveEvent newElement = UMLFactory.eINSTANCE.createAnyReceiveEvent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_AnyReceiveEvent_2085(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java
index 6a5d53dbdd4..d2e559184b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ArtifactCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ArtifactCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ArtifactCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ArtifactCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ArtifactCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ArtifactCreateCommand(req, eObject);
+ public static ArtifactCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ArtifactCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ArtifactCreateCommand(CreateElementRequest req) {
+ public ArtifactCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ArtifactCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ArtifactCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_2079(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java
index d256872c3fc..faa7800defe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ArtifactCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ArtifactCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ArtifactCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ArtifactCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ArtifactCreateCommandCN(req, eObject);
+ public static ArtifactCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ArtifactCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ArtifactCreateCommandCN(CreateElementRequest req) {
+ public ArtifactCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_3093(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java
index 80a7654624a..2587ee11904 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CallEventCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.CallEvent;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CallEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CallEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CallEventCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CallEventCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CallEventCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CallEventCreateCommand(req, eObject);
+ public static CallEventCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CallEventCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CallEventCreateCommand(CreateElementRequest req) {
+ public CallEventCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class CallEventCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCallEvent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class CallEventCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CallEvent newElement = UMLFactory.eINSTANCE.createCallEvent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CallEvent_2084(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java
index 9b9fb6bf27d..93ab13e7c83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ChangeEventCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.ChangeEvent;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ChangeEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ChangeEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ChangeEventCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ChangeEventCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ChangeEventCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ChangeEventCreateCommand(req, eObject);
+ public static ChangeEventCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ChangeEventCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ChangeEventCreateCommand(CreateElementRequest req) {
+ public ChangeEventCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ChangeEventCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getChangeEvent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ChangeEventCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ChangeEvent newElement = UMLFactory.eINSTANCE.createChangeEvent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ChangeEvent_2088(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java
index 15b11b78d29..fa6c01e9656 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ClassCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ClassCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ClassCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ClassCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ClassCompositeCreateCommand(req, eObject);
+ public static ClassCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassCompositeCreateCommand(CreateElementRequest req) {
+ public ClassCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ClassCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ClassCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_2073(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java
index 0abb6030a17..0261e8994db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCompositeCreateCommandCN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ClassCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ClassCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ClassCompositeCreateCommandCN(req, eObject);
+ public static ClassCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassCompositeCreateCommandCN(CreateElementRequest req) {
+ public ClassCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ClassCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3085(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCreateCommandCLN.java
index 00744a13adb..44e3f1318fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ClassCreateCommandCLN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ClassCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ClassCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public ClassCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public ClassCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new ClassCreateCommandCLN(req, eObject);
+ public static ClassCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassCreateCommandCLN(CreateElementRequest req) {
+ public ClassCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ClassCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ClassCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3114(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java
index 975f94b54c0..89182045645 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CollaborationCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CollaborationCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CollaborationCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CollaborationCompositeCreateCommand(req, eObject);
+ public static CollaborationCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CollaborationCompositeCreateCommand(CreateElementRequest req) {
+ public CollaborationCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaboration());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class CollaborationCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Collaboration_2075(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java
index 7a7f9b5afd8..4573349ee60 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CollaborationCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CollaborationCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CollaborationCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CollaborationCompositeCreateCommandCN(req, eObject);
+ public static CollaborationCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CollaborationCompositeCreateCommandCN(CreateElementRequest req) {
+ public CollaborationCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaboration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CollaborationCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Collaboration_3086(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCreateCommandCLN.java
index f9610be706e..1cbe0be564e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Collaboration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CollaborationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CollaborationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public CollaborationCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public CollaborationCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CollaborationCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new CollaborationCreateCommandCLN(req, eObject);
+ public static CollaborationCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public CollaborationCreateCommandCLN(CreateElementRequest req) {
+ public CollaborationCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CollaborationCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaboration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CollaborationCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Collaboration newElement = UMLFactory.eINSTANCE.createCollaboration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Collaboration_3109(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java
index 1a0d1104394..3c71fc3caf2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationRoleCreateCommandCN.java
@@ -24,8 +24,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -35,7 +39,7 @@ public class CollaborationRoleCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -45,24 +49,25 @@ public class CollaborationRoleCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CollaborationRoleCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CollaborationRoleCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CollaborationRoleCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CollaborationRoleCreateCommandCN(req, eObject);
+ public static CollaborationRoleCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationRoleCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CollaborationRoleCreateCommandCN(CreateElementRequest req) {
+ public CollaborationRoleCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -85,7 +90,9 @@ public class CollaborationRoleCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConnectableElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java
index b6552868de0..7766e1db7b5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CollaborationUseCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.CollaborationUse;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CollaborationUseCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CollaborationUseCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CollaborationUseCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CollaborationUseCreateCommandCN(req, eObject);
+ public static CollaborationUseCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CollaborationUseCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CollaborationUseCreateCommandCN(CreateElementRequest req) {
+ public CollaborationUseCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCollaborationUse());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CollaborationUseCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CollaborationUse newElement = UMLFactory.eINSTANCE.createCollaborationUse();
- Classifier owner = (Classifier)getElementToEdit();
- owner.getCollaborationUses().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Classifier qualifiedTarget = (Classifier)target;
+ qualifiedTarget.getCollaborationUses().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CollaborationUse_3071(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java
index cf9a2f020e0..c1a4052338a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_2109(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java
index a92f5923eef..dfa61732214 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/CommentCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3097(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java
index 73b47b973d7..b2f377147ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ComponentCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ComponentCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ComponentCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ComponentCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ComponentCompositeCreateCommand(req, eObject);
+ public static ComponentCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCompositeCreateCommand(CreateElementRequest req) {
+ public ComponentCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ComponentCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ComponentCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_2069(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java
index c4ef914b2de..6f75995d080 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ComponentCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ComponentCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ComponentCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ComponentCompositeCreateCommandCN(req, eObject);
+ public static ComponentCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentCompositeCreateCommandCN(CreateElementRequest req) {
+ public ComponentCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ComponentCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3081(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java
index e38ac029b09..bcdd44c5aab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_2114(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java
index 932ca4e236a..41d731227b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3120(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java
index d35adef9781..569c7133877 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommand(req, eObject);
+ public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req) {
+ public DataTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DataTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_2068(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCLN.java
index 9f3305c9a26..609d03b6fe7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommandCLN(req, eObject);
+ public static DataTypeCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommandCLN(CreateElementRequest req) {
+ public DataTypeCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypeCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypeCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3113(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java
index 9de8ac980f4..c9b5b9ff851 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DataTypeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommandCN(req, eObject);
+ public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3080(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java
index 25f19bdbcb5..9e11e35f328 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DeploymentSpecification;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DeploymentSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DeploymentSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeploymentSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DeploymentSpecificationCreateCommand(req, eObject);
+ public static DeploymentSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeploymentSpecificationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DeploymentSpecificationCreateCommand(CreateElementRequest req) {
+ public DeploymentSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDeploymentSpecification());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DeploymentSpecificationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DeploymentSpecification_2078(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java
index 219ec793fb7..083e20fe64d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeploymentSpecificationCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.DeploymentSpecification;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DeploymentSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DeploymentSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeploymentSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DeploymentSpecificationCreateCommandCN(req, eObject);
+ public static DeploymentSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeploymentSpecificationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DeploymentSpecificationCreateCommandCN(CreateElementRequest req) {
+ public DeploymentSpecificationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDeploymentSpecification());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DeploymentSpecificationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DeploymentSpecification newElement = UMLFactory.eINSTANCE.createDeploymentSpecification();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DeploymentSpecification_3092(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java
index 2d2794e128f..2c4ab5b38b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DeviceCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DeviceCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DeviceCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DeviceCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeviceCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DeviceCompositeCreateCommand(req, eObject);
+ public static DeviceCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeviceCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DeviceCompositeCreateCommand(CreateElementRequest req) {
+ public DeviceCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DeviceCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DeviceCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Device newElement = UMLFactory.eINSTANCE.createDevice();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Device_2070(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java
index 9078391c556..8b9fa1ef9a6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DeviceCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DeviceCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DeviceCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeviceCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DeviceCompositeCreateCommandCN(req, eObject);
+ public static DeviceCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeviceCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DeviceCompositeCreateCommandCN(CreateElementRequest req) {
+ public DeviceCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DeviceCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Device newElement = UMLFactory.eINSTANCE.createDevice();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Device_3082(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java
index 4f84d6f79ab..f069de1afd3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintCreateCommand(req, eObject);
+ public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintCreateCommand(CreateElementRequest req) {
+ public DurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_2110(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java
index bfedbad1401..b58c6299ac4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DurationConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintCreateCommandCN(req, eObject);
+ public static DurationConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintCreateCommandCN(CreateElementRequest req) {
+ public DurationConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_3116(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java
index a4cfdab65ca..a76c0efb1df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Duration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationCreateCommand(req, eObject);
+ public static DurationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationCreateCommand(CreateElementRequest req) {
+ public DurationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DurationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDuration());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DurationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Duration newElement = UMLFactory.eINSTANCE.createDuration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Duration_2104(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java
index 56ceb554bad..1839cc58c05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationIntervalCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationInterval;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationIntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationIntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationIntervalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationIntervalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationIntervalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationIntervalCreateCommand(req, eObject);
+ public static DurationIntervalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationIntervalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationIntervalCreateCommand(CreateElementRequest req) {
+ public DurationIntervalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DurationIntervalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationInterval());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DurationIntervalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationInterval newElement = UMLFactory.eINSTANCE.createDurationInterval();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationInterval_2106(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java
index 7b4d0b5b464..888e72c8052 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/DurationObservationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationObservationCreateCommand(req, eObject);
+ public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req) {
+ public DurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class DurationObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class DurationObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationObservation_2093(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java
index 5770c643070..dfbf07c831e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommand(req, eObject);
+ public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req) {
+ public EnumerationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class EnumerationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class EnumerationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_2067(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCLN.java
index 8b6951b8579..efe5bdcb319 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommandCLN(req, eObject);
+ public static EnumerationCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommandCLN(CreateElementRequest req) {
+ public EnumerationCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3111(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java
index 49471eda4b6..c82acf1e734 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommandCN(req, eObject);
+ public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3079(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java
index f99097d42ad..5efbd743b3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/EnumerationLiteralCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public EnumerationLiteralCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public EnumerationLiteralCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationLiteralCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new EnumerationLiteralCreateCommandCLN(req, eObject);
+ public static EnumerationLiteralCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationLiteralCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationLiteralCreateCommandCLN(CreateElementRequest req) {
+ public EnumerationLiteralCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationLiteralCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
- Enumeration owner = (Enumeration)getElementToEdit();
- owner.getOwnedLiterals().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Enumeration qualifiedTarget = (Enumeration)target;
+ qualifiedTarget.getOwnedLiterals().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_EnumerationLiteral_3066(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java
index 3c26171aaf2..86aebd22065 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma
/**
* @generated
*/
- public ExecutionEnvironmentCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExecutionEnvironmentCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExecutionEnvironmentCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExecutionEnvironmentCompositeCreateCommand(req, eObject);
+ public static ExecutionEnvironmentCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExecutionEnvironmentCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExecutionEnvironmentCompositeCreateCommand(CreateElementRequest req) {
+ public ExecutionEnvironmentCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ExecutionEnvironmentCompositeCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExecutionEnvironment_2071(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java
index c366de24fb5..5f4ad0dee02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExecutionEnvironmentCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom
/**
* @generated
*/
- public ExecutionEnvironmentCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ExecutionEnvironmentCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExecutionEnvironmentCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ExecutionEnvironmentCompositeCreateCommandCN(req, eObject);
+ public static ExecutionEnvironmentCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExecutionEnvironmentCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ExecutionEnvironmentCompositeCreateCommandCN(CreateElementRequest req) {
+ public ExecutionEnvironmentCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ExecutionEnvironmentCompositeCreateCommandCN extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExecutionEnvironment_3083(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java
index e3a00d51578..c20872e3776 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ExpressionCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Expression;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExpressionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExpressionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExpressionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExpressionCreateCommand(req, eObject);
+ public static ExpressionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExpressionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExpressionCreateCommand(CreateElementRequest req) {
+ public ExpressionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ExpressionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExpression());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ExpressionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Expression newElement = UMLFactory.eINSTANCE.createExpression();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Expression_2103(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java
index 5251ebf02b8..05ba88f1841 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.FunctionBehavior;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public FunctionBehaviorCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public FunctionBehaviorCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FunctionBehaviorCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new FunctionBehaviorCompositeCreateCommand(req, eObject);
+ public static FunctionBehaviorCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FunctionBehaviorCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public FunctionBehaviorCompositeCreateCommand(CreateElementRequest req) {
+ public FunctionBehaviorCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFunctionBehavior());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class FunctionBehaviorCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_FunctionBehavior_2064(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java
index f35192f503c..53ce1a8042b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.FunctionBehavior;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand
/**
* @generated
*/
- public FunctionBehaviorCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public FunctionBehaviorCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FunctionBehaviorCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new FunctionBehaviorCompositeCreateCommandCN(req, eObject);
+ public static FunctionBehaviorCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FunctionBehaviorCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public FunctionBehaviorCompositeCreateCommandCN(CreateElementRequest req) {
+ public FunctionBehaviorCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFunctionBehavior());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class FunctionBehaviorCompositeCreateCommandCN extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_FunctionBehavior_3076(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCreateCommandCLN.java
index 697910123a7..5add797436a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/FunctionBehaviorCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.FunctionBehavior;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class FunctionBehaviorCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class FunctionBehaviorCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public FunctionBehaviorCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public FunctionBehaviorCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FunctionBehaviorCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new FunctionBehaviorCreateCommandCLN(req, eObject);
+ public static FunctionBehaviorCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FunctionBehaviorCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public FunctionBehaviorCreateCommandCLN(CreateElementRequest req) {
+ public FunctionBehaviorCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class FunctionBehaviorCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFunctionBehavior());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class FunctionBehaviorCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
FunctionBehavior newElement = UMLFactory.eINSTANCE.createFunctionBehavior();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_FunctionBehavior_3107(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java
index c8a876b33b1..a075d222cfe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InformationItemCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InformationItemCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InformationItemCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InformationItemCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InformationItemCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InformationItemCreateCommand(req, eObject);
+ public static InformationItemCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InformationItemCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InformationItemCreateCommand(CreateElementRequest req) {
+ public InformationItemCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class InformationItemCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class InformationItemCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InformationItem_2080(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java
index cdad80fdfab..7a83beb550a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InformationItemCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.InformationItem;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InformationItemCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InformationItemCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InformationItemCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InformationItemCreateCommandCN(req, eObject);
+ public static InformationItemCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InformationItemCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InformationItemCreateCommandCN(CreateElementRequest req) {
+ public InformationItemCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInformationItem());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InformationItemCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InformationItem newElement = UMLFactory.eINSTANCE.createInformationItem();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InformationItem_3094(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java
index 31bc4950150..2ed34bf32ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InstanceValueCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.InstanceValue;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InstanceValueCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InstanceValueCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InstanceValueCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InstanceValueCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InstanceValueCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InstanceValueCreateCommand(req, eObject);
+ public static InstanceValueCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InstanceValueCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InstanceValueCreateCommand(CreateElementRequest req) {
+ public InstanceValueCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class InstanceValueCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInstanceValue());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class InstanceValueCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InstanceValue newElement = UMLFactory.eINSTANCE.createInstanceValue();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InstanceValue_2108(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java
index fddb0dabcc1..8f4126a8492 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionCompositeCreateCommand(req, eObject);
+ public static InteractionCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCompositeCreateCommand(CreateElementRequest req) {
+ public InteractionCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class InteractionCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class InteractionCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interaction_2061(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java
index 9031f5936ad..cc4781b571c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InteractionCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InteractionCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InteractionCompositeCreateCommandCN(req, eObject);
+ public static InteractionCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCompositeCreateCommandCN(CreateElementRequest req) {
+ public InteractionCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InteractionCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interaction_3073(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java
index be9d55f50c2..9a7207f5f45 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.InteractionConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class InteractionConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class InteractionConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionConstraintCreateCommand(req, eObject);
+ public static InteractionConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionConstraintCreateCommand(CreateElementRequest req) {
+ public InteractionConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class InteractionConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionConstraint());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class InteractionConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InteractionConstraint_2113(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java
index 0e3263d07f6..b504082d0b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.InteractionConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InteractionConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InteractionConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InteractionConstraintCreateCommandCN(req, eObject);
+ public static InteractionConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionConstraintCreateCommandCN(CreateElementRequest req) {
+ public InteractionConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InteractionConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InteractionConstraint newElement = UMLFactory.eINSTANCE.createInteractionConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InteractionConstraint_3119(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCreateCommandCLN.java
index 558bf779f50..49bfabd5c81 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InteractionCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public InteractionCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public InteractionCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new InteractionCreateCommandCLN(req, eObject);
+ public static InteractionCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCreateCommandCLN(CreateElementRequest req) {
+ public InteractionCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InteractionCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InteractionCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interaction_3104(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java
index a1b69372147..7ea4bf733a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InterfaceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommand(req, eObject);
+ public static InterfaceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommand(CreateElementRequest req) {
+ public InterfaceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class InterfaceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class InterfaceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_2076(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCLN.java
index 405d483d307..def4bbe8c81 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InterfaceCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InterfaceCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommandCLN(req, eObject);
+ public static InterfaceCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommandCLN(CreateElementRequest req) {
+ public InterfaceCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InterfaceCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InterfaceCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3110(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java
index bfd650f9afd..46a93ee3584 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/InterfaceCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public InterfaceCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public InterfaceCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InterfaceCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new InterfaceCreateCommandCN(req, eObject);
+ public static InterfaceCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InterfaceCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public InterfaceCreateCommandCN(CreateElementRequest req) {
+ public InterfaceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterface());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InterfaceCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interface newElement = UMLFactory.eINSTANCE.createInterface();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interface_3087(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java
index a0e29dcc550..77cb5aac704 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.IntervalConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class IntervalConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class IntervalConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public IntervalConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public IntervalConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static IntervalConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new IntervalConstraintCreateCommand(req, eObject);
+ public static IntervalConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new IntervalConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public IntervalConstraintCreateCommand(CreateElementRequest req) {
+ public IntervalConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class IntervalConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class IntervalConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_IntervalConstraint_2112(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java
index 88fb20d5bb2..af5ed29ff2b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.IntervalConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public IntervalConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public IntervalConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static IntervalConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new IntervalConstraintCreateCommandCN(req, eObject);
+ public static IntervalConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new IntervalConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public IntervalConstraintCreateCommandCN(CreateElementRequest req) {
+ public IntervalConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getIntervalConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class IntervalConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
IntervalConstraint newElement = UMLFactory.eINSTANCE.createIntervalConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_IntervalConstraint_3118(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java
index a3c3e410844..871b46c400d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/IntervalCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interval;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class IntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class IntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public IntervalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public IntervalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static IntervalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new IntervalCreateCommand(req, eObject);
+ public static IntervalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new IntervalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public IntervalCreateCommand(CreateElementRequest req) {
+ public IntervalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class IntervalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInterval());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class IntervalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interval newElement = UMLFactory.eINSTANCE.createInterval();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interval_2107(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java
index f17b10fa85b..313fa76ac05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralBooleanCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.LiteralBoolean;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LiteralBooleanCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LiteralBooleanCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LiteralBooleanCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LiteralBooleanCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LiteralBooleanCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LiteralBooleanCreateCommand(req, eObject);
+ public static LiteralBooleanCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LiteralBooleanCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LiteralBooleanCreateCommand(CreateElementRequest req) {
+ public LiteralBooleanCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class LiteralBooleanCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralBoolean());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class LiteralBooleanCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LiteralBoolean newElement = UMLFactory.eINSTANCE.createLiteralBoolean();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LiteralBoolean_2095(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java
index d49441cd35a..929b9a88726 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralIntegerCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.LiteralInteger;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LiteralIntegerCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LiteralIntegerCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LiteralIntegerCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LiteralIntegerCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LiteralIntegerCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LiteralIntegerCreateCommand(req, eObject);
+ public static LiteralIntegerCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LiteralIntegerCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LiteralIntegerCreateCommand(CreateElementRequest req) {
+ public LiteralIntegerCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class LiteralIntegerCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralInteger());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class LiteralIntegerCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LiteralInteger newElement = UMLFactory.eINSTANCE.createLiteralInteger();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LiteralInteger_2096(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java
index d73c5467b93..cf2032c9b7c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralNullCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.LiteralNull;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LiteralNullCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LiteralNullCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LiteralNullCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LiteralNullCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LiteralNullCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LiteralNullCreateCommand(req, eObject);
+ public static LiteralNullCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LiteralNullCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LiteralNullCreateCommand(CreateElementRequest req) {
+ public LiteralNullCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class LiteralNullCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralNull());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class LiteralNullCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LiteralNull newElement = UMLFactory.eINSTANCE.createLiteralNull();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LiteralNull_2097(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java
index 8c431acdbe0..8ec887d195e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralStringCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.LiteralString;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LiteralStringCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LiteralStringCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LiteralStringCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LiteralStringCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LiteralStringCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LiteralStringCreateCommand(req, eObject);
+ public static LiteralStringCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LiteralStringCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LiteralStringCreateCommand(CreateElementRequest req) {
+ public LiteralStringCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class LiteralStringCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralString());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class LiteralStringCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LiteralString newElement = UMLFactory.eINSTANCE.createLiteralString();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LiteralString_2098(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java
index 3122af0dcbe..635dc70730e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/LiteralUnlimitedNaturalCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LiteralUnlimitedNaturalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LiteralUnlimitedNaturalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LiteralUnlimitedNaturalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LiteralUnlimitedNaturalCreateCommand(req, eObject);
+ public static LiteralUnlimitedNaturalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LiteralUnlimitedNaturalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LiteralUnlimitedNaturalCreateCommand(CreateElementRequest req) {
+ public LiteralUnlimitedNaturalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLiteralUnlimitedNatural());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class LiteralUnlimitedNaturalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
LiteralUnlimitedNatural newElement = UMLFactory.eINSTANCE.createLiteralUnlimitedNatural();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_LiteralUnlimitedNatural_2099(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java
index 4e36ffd85b1..0539351a7cb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class NodeCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class NodeCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NodeCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NodeCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NodeCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NodeCompositeCreateCommand(req, eObject);
+ public static NodeCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NodeCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NodeCompositeCreateCommand(CreateElementRequest req) {
+ public NodeCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class NodeCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class NodeCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Node newElement = UMLFactory.eINSTANCE.createNode();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Node_2072(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java
index 5a731d17284..cd0db0a18de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/NodeCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public NodeCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NodeCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NodeCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NodeCompositeCreateCommandCN(req, eObject);
+ public static NodeCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NodeCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NodeCompositeCreateCommandCN(CreateElementRequest req) {
+ public NodeCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class NodeCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Node newElement = UMLFactory.eINSTANCE.createNode();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Node_3084(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java
index 3c5ad477e1e..50617463e4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OpaqueBehaviorCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OpaqueBehaviorCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OpaqueBehaviorCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OpaqueBehaviorCompositeCreateCommand(req, eObject);
+ public static OpaqueBehaviorCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OpaqueBehaviorCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OpaqueBehaviorCompositeCreateCommand(CreateElementRequest req) {
+ public OpaqueBehaviorCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueBehavior());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class OpaqueBehaviorCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OpaqueBehavior_2065(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java
index 56c8e6fa777..de9a7ac5663 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public OpaqueBehaviorCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public OpaqueBehaviorCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OpaqueBehaviorCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new OpaqueBehaviorCompositeCreateCommandCN(req, eObject);
+ public static OpaqueBehaviorCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OpaqueBehaviorCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public OpaqueBehaviorCompositeCreateCommandCN(CreateElementRequest req) {
+ public OpaqueBehaviorCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueBehavior());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class OpaqueBehaviorCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OpaqueBehavior_3077(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCreateCommandCLN.java
index 20db17aed51..34df0cd47fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueBehaviorCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OpaqueBehaviorCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OpaqueBehaviorCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public OpaqueBehaviorCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public OpaqueBehaviorCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OpaqueBehaviorCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new OpaqueBehaviorCreateCommandCLN(req, eObject);
+ public static OpaqueBehaviorCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OpaqueBehaviorCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public OpaqueBehaviorCreateCommandCLN(CreateElementRequest req) {
+ public OpaqueBehaviorCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class OpaqueBehaviorCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueBehavior());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class OpaqueBehaviorCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OpaqueBehavior newElement = UMLFactory.eINSTANCE.createOpaqueBehavior();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OpaqueBehavior_3108(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java
index 3376e239c05..ad70071dc53 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OpaqueExpressionCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.OpaqueExpression;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public OpaqueExpressionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public OpaqueExpressionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OpaqueExpressionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new OpaqueExpressionCreateCommand(req, eObject);
+ public static OpaqueExpressionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OpaqueExpressionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public OpaqueExpressionCreateCommand(CreateElementRequest req) {
+ public OpaqueExpressionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOpaqueExpression());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class OpaqueExpressionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
OpaqueExpression newElement = UMLFactory.eINSTANCE.createOpaqueExpression();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_OpaqueExpression_2101(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java
index 08abf319e99..3ad382d35ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/OperationCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class OperationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class OperationCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public OperationCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public OperationCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OperationCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new OperationCreateCommandCLN(req, eObject);
+ public static OperationCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OperationCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public OperationCreateCommandCLN(CreateElementRequest req) {
+ public OperationCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class OperationCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class OperationCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3102(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java
index fff003a66a3..d7af577d38a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ParameterCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ParameterCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ParameterCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ParameterCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ParameterCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ParameterCreateCommand(req, eObject);
+ public static ParameterCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ParameterCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ParameterCreateCommand(CreateElementRequest req) {
+ public ParameterCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ParameterCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getParameter());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ParameterCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Parameter newElement = UMLFactory.eINSTANCE.createParameter();
- Behavior owner = (Behavior)getElementToEdit();
- owner.getOwnedParameters().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Behavior qualifiedTarget = (Behavior)target;
+ qualifiedTarget.getOwnedParameters().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Parameter_3088(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java
index 6fd38fb5906..07e372c0bae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PortCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PortCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PortCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PortCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PortCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PortCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PortCreateCommand(req, eObject);
+ public static PortCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PortCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PortCreateCommand(CreateElementRequest req) {
+ public PortCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PortCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPort());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PortCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Port newElement = UMLFactory.eINSTANCE.createPort();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Port_3069(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java
index 2eb008b6097..70dbecf2af3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommand(req, eObject);
+ public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_2066(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCLN.java
index 3ecc0443fbc..2a2403fb50c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PrimitiveTypeCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PrimitiveTypeCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommandCLN(req, eObject);
+ public static PrimitiveTypeCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCLN(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PrimitiveTypeCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PrimitiveTypeCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3112(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java
index 5b1229f36df..ab34b3bf0b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PrimitiveTypeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommandCN(req, eObject);
+ public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3078(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java
index 425c4c5ad43..d77baccbe11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PropertyCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PropertyCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public PropertyCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public PropertyCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new PropertyCreateCommandCLN(req, eObject);
+ public static PropertyCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyCreateCommandCLN(CreateElementRequest req) {
+ public PropertyCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PropertyCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PropertyCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3101(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java
index a369a6c3c5c..0f4bcab9faf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/PropertyPartCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PropertyPartCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PropertyPartCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PropertyPartCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PropertyPartCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PropertyPartCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PropertyPartCreateCommandCN(req, eObject);
+ public static PropertyPartCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PropertyPartCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PropertyPartCreateCommandCN(CreateElementRequest req) {
+ public PropertyPartCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PropertyPartCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PropertyPartCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3070(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java
index 72fcef5ed39..2e103079c3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.ProtocolStateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma
/**
* @generated
*/
- public ProtocolStateMachineCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ProtocolStateMachineCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ProtocolStateMachineCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ProtocolStateMachineCompositeCreateCommand(req, eObject);
+ public static ProtocolStateMachineCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ProtocolStateMachineCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ProtocolStateMachineCompositeCreateCommand(CreateElementRequest req) {
+ public ProtocolStateMachineCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProtocolStateMachine());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class ProtocolStateMachineCompositeCreateCommand extends EditElementComma
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ProtocolStateMachine_2062(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java
index a174d2a0da7..d92a7605bfc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.ProtocolStateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom
/**
* @generated
*/
- public ProtocolStateMachineCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ProtocolStateMachineCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ProtocolStateMachineCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ProtocolStateMachineCompositeCreateCommandCN(req, eObject);
+ public static ProtocolStateMachineCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ProtocolStateMachineCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ProtocolStateMachineCompositeCreateCommandCN(CreateElementRequest req) {
+ public ProtocolStateMachineCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProtocolStateMachine());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ProtocolStateMachineCompositeCreateCommandCN extends EditElementCom
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ProtocolStateMachine_3074(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCreateCommandCLN.java
index d2a12b15622..af80ab39dbd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ProtocolStateMachineCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.ProtocolStateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ProtocolStateMachineCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ProtocolStateMachineCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public ProtocolStateMachineCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public ProtocolStateMachineCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ProtocolStateMachineCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new ProtocolStateMachineCreateCommandCLN(req, eObject);
+ public static ProtocolStateMachineCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ProtocolStateMachineCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public ProtocolStateMachineCreateCommandCLN(CreateElementRequest req) {
+ public ProtocolStateMachineCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ProtocolStateMachineCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProtocolStateMachine());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ProtocolStateMachineCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ProtocolStateMachine newElement = UMLFactory.eINSTANCE.createProtocolStateMachine();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ProtocolStateMachine_3105(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ReceptionCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ReceptionCreateCommandCLN.java
index 6abbf90f7c2..8fb2ad6c263 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ReceptionCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/ReceptionCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ReceptionCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ReceptionCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public ReceptionCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public ReceptionCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ReceptionCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new ReceptionCreateCommandCLN(req, eObject);
+ public static ReceptionCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ReceptionCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public ReceptionCreateCommandCLN(CreateElementRequest req) {
+ public ReceptionCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ReceptionCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getReception());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ReceptionCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Reception newElement = UMLFactory.eINSTANCE.createReception();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedReceptions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedReceptions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Reception_3100(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java
index 63e6cc89477..8cb9ec7f8c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class SignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class SignalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SignalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SignalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SignalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SignalCreateCommand(req, eObject);
+ public static SignalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SignalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SignalCreateCommand(CreateElementRequest req) {
+ public SignalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class SignalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class SignalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_2081(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java
index 67613c9e5d4..cea89662812 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class SignalCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class SignalCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public SignalCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public SignalCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SignalCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new SignalCreateCommandCN(req, eObject);
+ public static SignalCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SignalCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public SignalCreateCommandCN(CreateElementRequest req) {
+ public SignalCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class SignalCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignal());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class SignalCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Signal newElement = UMLFactory.eINSTANCE.createSignal();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Signal_3095(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java
index 3aa7b8f6a35..1ba03433ffa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/SignalEventCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.SignalEvent;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class SignalEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class SignalEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public SignalEventCreateCommand(CreateElementRequest req, EObject eObject) {
+ public SignalEventCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SignalEventCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new SignalEventCreateCommand(req, eObject);
+ public static SignalEventCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SignalEventCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public SignalEventCreateCommand(CreateElementRequest req) {
+ public SignalEventCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class SignalEventCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getSignalEvent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class SignalEventCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
SignalEvent newElement = UMLFactory.eINSTANCE.createSignalEvent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_SignalEvent_2083(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java
index a41bedaa913..f75401252c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public StateMachineCompositeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StateMachineCompositeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StateMachineCompositeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StateMachineCompositeCreateCommand(req, eObject);
+ public static StateMachineCompositeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateMachineCompositeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StateMachineCompositeCreateCommand(CreateElementRequest req) {
+ public StateMachineCompositeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class StateMachineCompositeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StateMachine_2063(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java
index 826e91753e3..0b11a90217f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCompositeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public StateMachineCompositeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public StateMachineCompositeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StateMachineCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new StateMachineCompositeCreateCommandCN(req, eObject);
+ public static StateMachineCompositeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateMachineCompositeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public StateMachineCompositeCreateCommandCN(CreateElementRequest req) {
+ public StateMachineCompositeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class StateMachineCompositeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StateMachine_3075(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCreateCommandCLN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCreateCommandCLN.java
index 8e92843c3b6..c7b7609bf20 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCreateCommandCLN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StateMachineCreateCommandCLN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StateMachineCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StateMachineCreateCommandCLN extends EditElementCommand {
/**
* @generated
*/
- public StateMachineCreateCommandCLN(CreateElementRequest req, EObject eObject) {
+ public StateMachineCreateCommandCLN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StateMachineCreateCommandCLN create(CreateElementRequest req, EObject eObject) {
- return new StateMachineCreateCommandCLN(req, eObject);
+ public static StateMachineCreateCommandCLN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateMachineCreateCommandCLN(req, eObject, diagram);
}
/**
* @generated
*/
- public StateMachineCreateCommandCLN(CreateElementRequest req) {
+ public StateMachineCreateCommandCLN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class StateMachineCreateCommandCLN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class StateMachineCreateCommandCLN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StateMachine_3106(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java
index 8901b2bbed9..d1d3af68ea9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/StringExpressionCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.StringExpression;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StringExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StringExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public StringExpressionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StringExpressionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StringExpressionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StringExpressionCreateCommand(req, eObject);
+ public static StringExpressionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StringExpressionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StringExpressionCreateCommand(CreateElementRequest req) {
+ public StringExpressionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class StringExpressionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStringExpression());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class StringExpressionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StringExpression newElement = UMLFactory.eINSTANCE.createStringExpression();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StringExpression_2100(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java
index 5f060233509..d33724ea7f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintCreateCommand(req, eObject);
+ public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintCreateCommand(CreateElementRequest req) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,11 +94,9 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
@@ -101,8 +104,19 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeConstraint_2111(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java
index cbab582a307..6e3526e11be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public TimeConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public TimeConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintCreateCommandCN(req, eObject);
+ public static TimeConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintCreateCommandCN(CreateElementRequest req) {
+ public TimeConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class TimeConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeConstraint_3117(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java
index ca87f264fab..a5bb77b7944 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeEventCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeEvent;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeEventCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeEventCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeEventCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeEventCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeEventCreateCommand(req, eObject);
+ public static TimeEventCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeEventCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeEventCreateCommand(CreateElementRequest req) {
+ public TimeEventCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class TimeEventCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeEvent());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class TimeEventCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeEvent newElement = UMLFactory.eINSTANCE.createTimeEvent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeEvent_2089(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java
index 5769dd9380e..dad6196f95a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeExpressionCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeExpression;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeExpressionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeExpressionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeExpressionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeExpressionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeExpressionCreateCommand(req, eObject);
+ public static TimeExpressionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeExpressionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeExpressionCreateCommand(CreateElementRequest req) {
+ public TimeExpressionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class TimeExpressionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeExpression());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class TimeExpressionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeExpression newElement = UMLFactory.eINSTANCE.createTimeExpression();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeExpression_2102(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java
index 5c9bc6b6079..c5e3d803e79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeIntervalCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeInterval;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeIntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeIntervalCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeIntervalCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeIntervalCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeIntervalCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeIntervalCreateCommand(req, eObject);
+ public static TimeIntervalCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeIntervalCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeIntervalCreateCommand(CreateElementRequest req) {
+ public TimeIntervalCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class TimeIntervalCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeInterval());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class TimeIntervalCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeInterval newElement = UMLFactory.eINSTANCE.createTimeInterval();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeInterval_2105(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java
index 130a2039ba6..fe0db2dad06 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/TimeObservationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeObservation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeObservationCreateCommand(req, eObject);
+ public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req) {
+ public TimeObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class TimeObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class TimeObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeObservation_2094(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java
index c4c0ee285d8..4924745731d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public UseCaseCreateCommand(CreateElementRequest req, EObject eObject) {
+ public UseCaseCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new UseCaseCreateCommand(req, eObject);
+ public static UseCaseCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseCreateCommand(CreateElementRequest req) {
+ public UseCaseCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,11 +93,9 @@ public class UseCaseCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -100,8 +103,19 @@ public class UseCaseCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_UseCase_2082(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java
index 13f1494e8a3..dcc78a32f1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/commands/UseCaseCreateCommandCN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.composite.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public UseCaseCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public UseCaseCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new UseCaseCreateCommandCN(req, eObject);
+ public static UseCaseCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseCreateCommandCN(CreateElementRequest req) {
+ public UseCaseCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class UseCaseCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class UseCaseCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_UseCase_3096(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java
index 026e96f360e..be06f34c677 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class ActivityCompositeCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java
index d301e557cd3..608854ef388 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class ActivityCompositeCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java
index a8794276a16..2c534e76f8e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class ActivityCompositeItemSemanticEditPolicy extends UMLBaseItemSemantic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java
index 5beb8b80879..b888b8c3053 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ActivityCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class ActivityCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemant
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java
index 83a075e0424..b89b86af4e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ClassCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java
index 8e63c223a24..9777cbaf88b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ClassCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseIt
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java
index 84f85257687..1e25451aefe 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ClassCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java
index 5264bb75844..f50a9f262ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ClassCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ClassCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
index 2181a52a1e9..fd77511fd00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
@@ -65,55 +66,55 @@ public class CollaborationCompositeCompartmentItemSemanticEditPolicy extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectableElement_3115 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationRoleCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java
index 1da2b1bc431..696e4bc7081 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CollaborationCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationRoleCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CollaborationUseCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
@@ -65,55 +66,55 @@ public class CollaborationCompositeCompartmentItemSemanticEditPolicyCN extends U
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectableElement_3115 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationRoleCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationRoleCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
index a8b1033a36f..84cf77c05ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
index b97a51a6daf..656bd39dfb8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ComponentCompositeCompartmentItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java
index ced03e067ae..fc65cab037f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ComponentCompositeItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java
index 76262476a80..b06e1878cdc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ComponentCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ComponentCompositeItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java
index f2fa30d1d3f..29ffc138807 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/CompositeStructureDiagramItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommand;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommand;
@@ -110,295 +111,295 @@ public class CompositeStructureDiagramItemSemanticEditPolicy extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommand(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_2061 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommand(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_2062 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommand(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_2063 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommand(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_2064 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommand(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_2065 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommand(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_2069 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommand(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_2070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommand(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_2071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommand(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_2072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommand(req));
+ return getGEFWrapper(new NodeCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_2073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommand(req));
+ return getGEFWrapper(new ClassCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_2075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommand(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_2076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommand(req));
+ return getGEFWrapper(new InterfaceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_2066 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_2067 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommand(req));
+ return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_2068 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommand(req));
+ return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_2077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommand(req));
+ return getGEFWrapper(new ActorCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_2078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommand(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_2079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommand(req));
+ return getGEFWrapper(new ArtifactCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_2080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommand(req));
+ return getGEFWrapper(new InformationItemCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_2081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommand(req));
+ return getGEFWrapper(new SignalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_2082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommand(req));
+ return getGEFWrapper(new UseCaseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.SignalEvent_2083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalEventCreateCommand(req));
+ return getGEFWrapper(new SignalEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CallEvent_2084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CallEventCreateCommand(req));
+ return getGEFWrapper(new CallEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.AnyReceiveEvent_2085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AnyReceiveEventCreateCommand(req));
+ return getGEFWrapper(new AnyReceiveEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ChangeEvent_2088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ChangeEventCreateCommand(req));
+ return getGEFWrapper(new ChangeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeEvent_2089 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeEventCreateCommand(req));
+ return getGEFWrapper(new TimeEventCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_2093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommand(req));
+ return getGEFWrapper(new DurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_2094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.LiteralBoolean_2095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LiteralBooleanCreateCommand(req));
+ return getGEFWrapper(new LiteralBooleanCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.LiteralInteger_2096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LiteralIntegerCreateCommand(req));
+ return getGEFWrapper(new LiteralIntegerCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.LiteralNull_2097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LiteralNullCreateCommand(req));
+ return getGEFWrapper(new LiteralNullCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.LiteralString_2098 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LiteralStringCreateCommand(req));
+ return getGEFWrapper(new LiteralStringCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.LiteralUnlimitedNatural_2099 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LiteralUnlimitedNaturalCreateCommand(req));
+ return getGEFWrapper(new LiteralUnlimitedNaturalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StringExpression_2100 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StringExpressionCreateCommand(req));
+ return getGEFWrapper(new StringExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueExpression_2101 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueExpressionCreateCommand(req));
+ return getGEFWrapper(new OpaqueExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeExpression_2102 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeExpressionCreateCommand(req));
+ return getGEFWrapper(new TimeExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Expression_2103 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExpressionCreateCommand(req));
+ return getGEFWrapper(new ExpressionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Duration_2104 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationCreateCommand(req));
+ return getGEFWrapper(new DurationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeInterval_2105 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeIntervalCreateCommand(req));
+ return getGEFWrapper(new TimeIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationInterval_2106 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationIntervalCreateCommand(req));
+ return getGEFWrapper(new DurationIntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interval_2107 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalCreateCommand(req));
+ return getGEFWrapper(new IntervalCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InstanceValue_2108 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InstanceValueCreateCommand(req));
+ return getGEFWrapper(new InstanceValueCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_2109 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_2110 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
+ return getGEFWrapper(new DurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_2111 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_2112 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommand(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_2113 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommand(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_2114 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
index 8d63a213af1..d1f22ab370d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyCreateCommandCLN(req));
+ return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index fb96bc0bd80..2759304b7f1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyCreateCommandCLN(req));
+ return getGEFWrapper(new PropertyCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
index 0ce5ef1628a..244baa8a10a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OperationCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationCreateCommandCLN(req));
+ return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 47c0e91fe4d..fd9d722e151 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.OperationCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OperationCreateCommandCLN(req));
+ return getGEFWrapper(new OperationCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
index 40a31add7ac..6091152e30c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicy extends UMLBaseIte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
index bba2d990a5d..eec9ac6fa4f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java
index c1b28d4d482..1fdf0386131 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class DeviceCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java
index 72fb4d39b5d..7275db0d5c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/DeviceCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class DeviceCompositeItemSemanticEditPolicyCN extends UMLBaseItemSemantic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
index ec9e254eb07..7a23d047714 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
index 6c00605d23a..0a50eeac6c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.EnumerationLiteralCreateCommandCLN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java
index 42a6fac952d..4128bcd7645 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java
index 323f87f7610..10c69fc493c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/EnumerationItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommandCLN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
index afe32f672d4..b8850b47de2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy exte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
index a709972685b..4dd1db469b7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN ex
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java
index 6c7bc4b79dc..87bddf7191d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java
index 844caa67210..85839275289 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ExecutionEnvironmentCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class ExecutionEnvironmentCompositeItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java
index 28abb6567f3..2e94033eaed 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
index e889cd8057a..4290cadc41f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class FunctionBehaviorCompositeCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java
index 4c56c73cb5d..23b8ca62434 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java
index 27df93ef93b..580f3d8b458 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/FunctionBehaviorCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class FunctionBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseIt
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java
index bdc2cf8f015..a20d08b88b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class InteractionCompositeCompartmentItemSemanticEditPolicy extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java
index dbd08a294de..2a7f4b22637 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class InteractionCompositeCompartmentItemSemanticEditPolicyCN extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java
index c93e5034cac..e63bfa4bd0f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class InteractionCompositeItemSemanticEditPolicy extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java
index f3a7fcaa29f..72f6991507a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/InteractionCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class InteractionCompositeItemSemanticEditPolicyCN extends UMLBaseItemSem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
index 189c8a36dc0..5abe5ac1f26 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class NodeCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
index aefb57eaab7..58a94d40471 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -86,181 +87,181 @@ public class NodeCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseIte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java
index cd94a926f4e..95a5a7496d5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class NodeCompositeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java
index 4569449faed..61509fb8a85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/NodeCompositeItemSemanticEditPolicycN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -107,7 +108,7 @@ public class NodeCompositeItemSemanticEditPolicycN extends UMLBaseItemSemanticEd
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java
index 5c83576bfdb..822be364270 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicy extends UM
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
index b7adda70cd6..ae93fc36a55 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class OpaqueBehaviorCompositeCompartmentItemSemanticEditPolicyCN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java
index 97289837307..6c4c404ad38 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicy extends UMLBaseItemSe
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java
index d447aeb534c..63300446abc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/OpaqueBehaviorCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class OpaqueBehaviorCompositeItemSemanticEditPolicyCN extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
index 1805f32551f..45b66a7d1de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.PropertyPartCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.providers.UMLElementTypes;
@@ -58,13 +59,13 @@ public class PropertyPartCompartmentItemSemanticEditPolicyCN extends UMLBaseItem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
index 450fb8fa4bf..a390e2f274b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/PropertyPartItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -102,7 +103,7 @@ public class PropertyPartItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java
index 9473841fc0b..04457da8851 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicy exte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
index f0e34d8fc38..2730d40536b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class ProtocolStateMachineCompositeCompartmentItemSemanticEditPolicyCN ex
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java
index cf08fa580ef..4eba53d1ef6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicy extends UMLBase
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java
index dd02b7965c5..76d2a316913 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/ProtocolStateMachineCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class ProtocolStateMachineCompositeItemSemanticEditPolicyCN extends UMLBa
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java
index 52c4488a248..2147cd75288 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class StateMachineCompositeCompartmentItemSemanticEditPolicy extends UMLB
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
index 73d08fd509e..37e487683da 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActivityCompositeCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ActorCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.ArtifactCreateCommandCN;
@@ -87,187 +88,187 @@ public class StateMachineCompositeCompartmentItemSemanticEditPolicyCN extends UM
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Property_3070 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PropertyPartCreateCommandCN(req));
+ return getGEFWrapper(new PropertyPartCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CollaborationUse_3071 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationUseCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationUseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Activity_3072 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActivityCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ActivityCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interaction_3073 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCompositeCreateCommandCN(req));
+ return getGEFWrapper(new InteractionCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ProtocolStateMachine_3074 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ProtocolStateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateMachine_3075 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req));
+ return getGEFWrapper(new StateMachineCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FunctionBehavior_3076 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new FunctionBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OpaqueBehavior_3077 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req));
+ return getGEFWrapper(new OpaqueBehaviorCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3081 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ComponentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_3082 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCompositeCreateCommandCN(req));
+ return getGEFWrapper(new DeviceCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_3083 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ExecutionEnvironmentCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_3084 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCompositeCreateCommandCN(req));
+ return getGEFWrapper(new NodeCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3085 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassCompositeCreateCommandCN(req));
+ return getGEFWrapper(new ClassCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Collaboration_3086 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req));
+ return getGEFWrapper(new CollaborationCompositeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Interface_3087 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InterfaceCreateCommandCN(req));
+ return getGEFWrapper(new InterfaceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3078 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3079 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3080 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3091 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandCN(req));
+ return getGEFWrapper(new ActorCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DeploymentSpecification_3092 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DeploymentSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_3093 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InformationItem_3094 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InformationItemCreateCommandCN(req));
+ return getGEFWrapper(new InformationItemCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Signal_3095 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SignalCreateCommandCN(req));
+ return getGEFWrapper(new SignalCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3096 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandCN(req));
+ return getGEFWrapper(new UseCaseCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3097 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3116 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3117 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommandCN(req));
+ return getGEFWrapper(new TimeConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.IntervalConstraint_3118 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new IntervalConstraintCreateCommandCN(req));
+ return getGEFWrapper(new IntervalConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionConstraint_3119 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionConstraintCreateCommandCN(req));
+ return getGEFWrapper(new InteractionConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3120 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java
index 7ae0a4704a2..94b3101ff5d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class StateMachineCompositeItemSemanticEditPolicy extends UMLBaseItemSema
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java
index fe73e2f371c..09b94280e14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/StateMachineCompositeItemSemanticEditPolicyCN.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.composite.edit.commands.AbstractionCreateCommand;
@@ -108,13 +109,13 @@ public class StateMachineCompositeItemSemanticEditPolicyCN extends UMLBaseItemSe
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PortCreateCommand(req));
+ return getGEFWrapper(new PortCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Parameter_3088 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ParameterCreateCommand(req));
+ return getGEFWrapper(new ParameterCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 34b84403d33..601d58a8752 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -139,15 +139,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
@SuppressWarnings("unchecked")
public Command getCommand(Request request) {
- if (request instanceof ReconnectRequest) {
- Object view = ((ReconnectRequest) request).getConnectionEditPart()
- .getModel();
- if (view instanceof View) {
- Integer id = new Integer(
- UMLVisualIDRegistry.getVisualID((View) view));
+ if(request instanceof ReconnectRequest) {
+ Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
+ if(view instanceof View) {
+ Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE,
- (View) view);
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, (View)view);
}
}
return super.getCommand(request);
@@ -160,7 +157,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected int getVisualID(IEditCommandRequest request) {
Object id = request.getParameter(VISUAL_ID_KEY);
- return id instanceof Integer ? ((Integer) id).intValue() : -1;
+ return id instanceof Integer ? ((Integer)id).intValue() : -1;
}
/**
@@ -169,12 +166,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
protected Command getSemanticCommand(IEditCommandRequest request) {
IEditCommandRequest completedRequest = completeRequest(request);
Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- semanticCommand = getEditHelperCommand(completedRequest,
- semanticCommand);
- if (completedRequest instanceof DestroyRequest) {
- DestroyRequest destroyRequest = (DestroyRequest) completedRequest;
- return shouldProceed(destroyRequest) ? addDeleteViewCommand(
- semanticCommand, destroyRequest) : null;
+ semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
+ if(completedRequest instanceof DestroyRequest) {
+ DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
+ return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
}
return semanticCommand;
}
@@ -182,35 +177,27 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command addDeleteViewCommand(Command mainCommand,
- DestroyRequest completedRequest) {
- Command deleteViewCommand = getGEFWrapper(new DeleteCommand(
- getEditingDomain(), (View) getHost().getModel()));
- return mainCommand == null ? deleteViewCommand : mainCommand
- .chain(deleteViewCommand);
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
+ return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
}
/**
* @generated
*/
- private Command getEditHelperCommand(IEditCommandRequest request,
- Command editPolicyCommand) {
- if (editPolicyCommand != null) {
- ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy) editPolicyCommand)
- .getICommand() : new CommandProxy(editPolicyCommand);
- request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND,
- command);
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
+ if(editPolicyCommand != null) {
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
IElementType requestContextElementType = getContextElementType(request);
- request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE,
- requestContextElementType);
+ request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, requestContextElementType);
ICommand command = requestContextElementType.getEditCommand(request);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, null);
request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, null);
- if (command != null) {
- if (!(command instanceof CompositeTransactionalCommand)) {
- command = new CompositeTransactionalCommand(getEditingDomain(),
- command.getLabel()).compose(command);
+ if(command != null) {
+ if(!(command instanceof CompositeTransactionalCommand)) {
+ command = new CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
}
return new ICommandProxy(command);
}
@@ -221,38 +208,36 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected IElementType getContextElementType(IEditCommandRequest request) {
- IElementType requestContextElementType = UMLElementTypes
- .getElementType(getVisualID(request));
- return requestContextElementType != null ? requestContextElementType
- : myElementType;
+ IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
}
/**
* @generated
*/
protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
- if (req instanceof CreateRelationshipRequest) {
- return getCreateRelationshipCommand((CreateRelationshipRequest) req);
- } else if (req instanceof CreateElementRequest) {
- return getCreateCommand((CreateElementRequest) req);
- } else if (req instanceof ConfigureRequest) {
- return getConfigureCommand((ConfigureRequest) req);
- } else if (req instanceof DestroyElementRequest) {
- return getDestroyElementCommand((DestroyElementRequest) req);
- } else if (req instanceof DestroyReferenceRequest) {
- return getDestroyReferenceCommand((DestroyReferenceRequest) req);
- } else if (req instanceof DuplicateElementsRequest) {
- return getDuplicateCommand((DuplicateElementsRequest) req);
- } else if (req instanceof GetEditContextRequest) {
- return getEditContextCommand((GetEditContextRequest) req);
- } else if (req instanceof MoveRequest) {
- return getMoveCommand((MoveRequest) req);
- } else if (req instanceof ReorientReferenceRelationshipRequest) {
- return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
- } else if (req instanceof ReorientRelationshipRequest) {
- return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
- } else if (req instanceof SetRequest) {
- return getSetCommand((SetRequest) req);
+ if(req instanceof CreateRelationshipRequest) {
+ return getCreateRelationshipCommand((CreateRelationshipRequest)req);
+ } else if(req instanceof CreateElementRequest) {
+ return getCreateCommand((CreateElementRequest)req);
+ } else if(req instanceof ConfigureRequest) {
+ return getConfigureCommand((ConfigureRequest)req);
+ } else if(req instanceof DestroyElementRequest) {
+ return getDestroyElementCommand((DestroyElementRequest)req);
+ } else if(req instanceof DestroyReferenceRequest) {
+ return getDestroyReferenceCommand((DestroyReferenceRequest)req);
+ } else if(req instanceof DuplicateElementsRequest) {
+ return getDuplicateCommand((DuplicateElementsRequest)req);
+ } else if(req instanceof GetEditContextRequest) {
+ return getEditContextCommand((GetEditContextRequest)req);
+ } else if(req instanceof MoveRequest) {
+ return getMoveCommand((MoveRequest)req);
+ } else if(req instanceof ReorientReferenceRelationshipRequest) {
+ return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest)req);
+ } else if(req instanceof ReorientRelationshipRequest) {
+ return getReorientRelationshipCommand((ReorientRelationshipRequest)req);
+ } else if(req instanceof SetRequest) {
+ return getSetCommand((SetRequest)req);
}
return null;
}
@@ -275,32 +260,16 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType instanceof IExtendedHintedElementType) {
- IExtendedHintedElementType extendedElementType = (IExtendedHintedElementType) requestElementType;
-
- // try to get a semantic create command from the extended type
- IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
- if (commandProvider != null) {
- ICommand command = commandProvider.getEditCommand(req);
- if (command != null && command.canExecute()) {
- return new ICommandProxy(command);
- }
- }
- }
-
+ // no more usage of the extended types here.
return null;
}
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(
- CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils
- .getCommandProvider(request.getContainer());
- if (provider == null) {
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -311,12 +280,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(
- CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils
- .getCommandProvider(requestElementType);
- if (provider == null) {
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -327,12 +293,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(
- CreateElementRequest request,
- IExtendedHintedElementType requestElementType) {
- IElementEditService provider = ElementEditServiceUtils
- .getCommandProvider(requestElementType);
- if (provider == null) {
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
@@ -380,12 +343,11 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected Command getMoveCommand(MoveRequest req) {
EObject targetCEObject = req.getTargetContainer();
- if (targetCEObject != null) {
- IElementEditService provider = ElementEditServiceUtils
- .getCommandProvider(targetCEObject);
- if (provider != null) {
+ if(targetCEObject != null) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ if(provider != null) {
ICommand moveCommand = provider.getEditCommand(req);
- if (moveCommand != null) {
+ if(moveCommand != null) {
return new ICommandProxy(moveCommand);
}
}
@@ -398,16 +360,14 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getReorientReferenceRelationshipCommand(
- ReorientReferenceRelationshipRequest req) {
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
/**
* @generated
*/
- protected Command getReorientRelationshipCommand(
- ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
@@ -424,7 +384,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart) getHost()).getEditingDomain();
+ return ((IGraphicalEditPart)getHost()).getEditingDomain();
}
/**
@@ -434,10 +394,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
- for (Iterator it = view.getDiagram().getChildren().iterator(); it
- .hasNext();) {
- View nextView = (View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
+ for(Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
+ View nextView = (View)it.next();
+ if(nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
continue;
}
cmd.add(new DeleteCommand(getEditingDomain(), nextView));
@@ -448,11 +407,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
public static LinkConstraints getLinkConstraints() {
- LinkConstraints cached = UMLDiagramEditorPlugin.getInstance()
- .getLinkConstraints();
- if (cached == null) {
- UMLDiagramEditorPlugin.getInstance().setLinkConstraints(
- cached = new LinkConstraints());
+ LinkConstraints cached = UMLDiagramEditorPlugin.getInstance().getLinkConstraints();
+ if(cached == null) {
+ UMLDiagramEditorPlugin.getInstance().setLinkConstraints(cached = new LinkConstraints());
}
return cached;
}
@@ -486,10 +443,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateCommentAnnotatedElement_4002(Comment source,
- Element target) {
- if (source != null) {
- if (source.getAnnotatedElements().contains(target)) {
+ public boolean canCreateCommentAnnotatedElement_4002(Comment source, Element target) {
+ if(source != null) {
+ if(source.getAnnotatedElements().contains(target)) {
return false;
}
}
@@ -499,10 +455,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateConstraintConstrainedElement_4003(
- Constraint source, Element target) {
- if (source != null) {
- if (source.getConstrainedElements().contains(target)) {
+ public boolean canCreateConstraintConstrainedElement_4003(Constraint source, Element target) {
+ if(source != null) {
+ if(source.getConstrainedElements().contains(target)) {
return false;
}
}
@@ -512,108 +467,93 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateComponentRealization_4004(Package container,
- NamedElement source, NamedElement target) {
- return canExistComponentRealization_4004(container, null, source,
- target);
+ public boolean canCreateComponentRealization_4004(Package container, NamedElement source, NamedElement target) {
+ return canExistComponentRealization_4004(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateInterfaceRealization_4005(Package container,
- NamedElement source, NamedElement target) {
- return canExistInterfaceRealization_4005(container, null, source,
- target);
+ public boolean canCreateInterfaceRealization_4005(Package container, NamedElement source, NamedElement target) {
+ return canExistInterfaceRealization_4005(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateSubstitution_4011(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateSubstitution_4011(Package container, NamedElement source, NamedElement target) {
return canExistSubstitution_4011(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateRealization_4006(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateRealization_4006(Package container, NamedElement source, NamedElement target) {
return canExistRealization_4006(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateManifestation_4012(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateManifestation_4012(Package container, NamedElement source, NamedElement target) {
return canExistManifestation_4012(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateAbstraction_4007(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateAbstraction_4007(Package container, NamedElement source, NamedElement target) {
return canExistAbstraction_4007(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateUsage_4008(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateUsage_4008(Package container, NamedElement source, NamedElement target) {
return canExistUsage_4008(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateDeployment_4009(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateDeployment_4009(Package container, NamedElement source, NamedElement target) {
return canExistDeployment_4009(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateDependency_4017(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateDependency_4017(Package container, NamedElement source, NamedElement target) {
return canExistDependency_4017(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateDependency_4010(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateDependency_4010(Package container, NamedElement source, NamedElement target) {
return canExistDependency_4010(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateConnector_4013(StructuredClassifier container,
- ConnectorEnd source, ConnectorEnd target) {
+ public boolean canCreateConnector_4013(StructuredClassifier container, ConnectorEnd source, ConnectorEnd target) {
return canExistConnector_4013(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateGeneralization_4015(Classifier container,
- Classifier source, Classifier target) {
+ public boolean canCreateGeneralization_4015(Classifier container, Classifier source, Classifier target) {
return canExistGeneralization_4015(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateTimeObservationEvent_4018(
- TimeObservation source, NamedElement target) {
- if (source != null) {
- if (source.getEvent() != null) {
+ public boolean canCreateTimeObservationEvent_4018(TimeObservation source, NamedElement target) {
+ if(source != null) {
+ if(source.getEvent() != null) {
return false;
}
}
@@ -623,11 +563,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateDurationObservationEvent_4019(
- DurationObservation source, NamedElement target) {
- if (source != null) {
- if (source.getEvents().size() >= 2
- || source.getEvents().contains(target)) {
+ public boolean canCreateDurationObservationEvent_4019(DurationObservation source, NamedElement target) {
+ if(source != null) {
+ if(source.getEvents().size() >= 2 || source.getEvents().contains(target)) {
return false;
}
}
@@ -637,10 +575,9 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateInformationItemRepresented_4020(
- InformationItem source, Classifier target) {
- if (source != null) {
- if (source.getRepresenteds().contains(target)) {
+ public boolean canCreateInformationItemRepresented_4020(InformationItem source, Classifier target) {
+ if(source != null) {
+ if(source.getRepresenteds().contains(target)) {
return false;
}
}
@@ -650,8 +587,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateInformationFlow_4021(Package container,
- NamedElement source, NamedElement target) {
+ public boolean canCreateInformationFlow_4021(Package container, NamedElement source, NamedElement target) {
return canExistInformationFlow_4021(container, null, source, target);
}
@@ -672,119 +608,97 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistCommentAnnotatedElement_4002(Comment source,
- Element target) {
+ public boolean canExistCommentAnnotatedElement_4002(Comment source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistConstraintConstrainedElement_4003(
- Constraint source, Element target) {
+ public boolean canExistConstraintConstrainedElement_4003(Constraint source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistComponentRealization_4004(Package container,
- ComponentRealization linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistComponentRealization_4004(Package container, ComponentRealization linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistInterfaceRealization_4005(Package container,
- InterfaceRealization linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistInterfaceRealization_4005(Package container, InterfaceRealization linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistSubstitution_4011(Package container,
- Substitution linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistSubstitution_4011(Package container, Substitution linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistRealization_4006(Package container,
- Realization linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistRealization_4006(Package container, Realization linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistManifestation_4012(Package container,
- Manifestation linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistManifestation_4012(Package container, Manifestation linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistAbstraction_4007(Package container,
- Abstraction linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistAbstraction_4007(Package container, Abstraction linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistUsage_4008(Package container,
- Usage linkInstance, NamedElement source, NamedElement target) {
+ public boolean canExistUsage_4008(Package container, Usage linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDeployment_4009(Package container,
- Deployment linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistDeployment_4009(Package container, Deployment linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDependency_4017(Package container,
- Dependency linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistDependency_4017(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
try {
// RoleBinding source constraint
- if ((source != null) && !(source instanceof CollaborationUse)) {
+ if((source != null) && !(source instanceof CollaborationUse)) {
return false;
}
// RoleBinding source has a type
- if ((source != null)
- && (((CollaborationUse) source).getType() == null)) {
+ if((source != null) && (((CollaborationUse)source).getType() == null)) {
return false;
}
// RoleBinding target constraint
- if ((target != null) && !(target instanceof ConnectableElement)) {
+ if((target != null) && !(target instanceof ConnectableElement)) {
return false;
}
// RoleBinding source and target have the same semantic parent
- if ((source != null) && (target != null)
- && (source.getOwner() != target.getOwner())) {
+ if((source != null) && (target != null) && (source.getOwner() != target.getOwner())) {
return false;
}
return true;
} catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError(
- "Link constraint evaluation error", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
return false;
}
}
@@ -792,64 +706,52 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistDependency_4010(Package container,
- Dependency linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistDependency_4010(Package container, Dependency linkInstance, NamedElement source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistConnector_4013(StructuredClassifier container,
- Connector linkInstance, ConnectorEnd source, ConnectorEnd target) {
+ public boolean canExistConnector_4013(StructuredClassifier container, Connector linkInstance, ConnectorEnd source, ConnectorEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistGeneralization_4015(Classifier container,
- Generalization linkInstance, Classifier source,
- Classifier target) {
+ public boolean canExistGeneralization_4015(Classifier container, Generalization linkInstance, Classifier source, Classifier target) {
return true;
}
/**
* @generated
*/
- public boolean canExistTimeObservationEvent_4018(
- TimeObservation source, NamedElement target) {
+ public boolean canExistTimeObservationEvent_4018(TimeObservation source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistDurationObservationEvent_4019(
- DurationObservation source, NamedElement target) {
+ public boolean canExistDurationObservationEvent_4019(DurationObservation source, NamedElement target) {
return true;
}
/**
* @generated
*/
- public boolean canExistInformationItemRepresented_4020(
- InformationItem source, Classifier target) {
+ public boolean canExistInformationItemRepresented_4020(InformationItem source, Classifier target) {
try {
// Represented InformationItem Target
- if (target != null) {
- if (!((target instanceof Class)
- || (target instanceof Interface)
- || (target instanceof InformationItem)
- || (target instanceof Signal) || (target instanceof Component))) {
+ if(target != null) {
+ if(!((target instanceof Class) || (target instanceof Interface) || (target instanceof InformationItem) || (target instanceof Signal) || (target instanceof Component))) {
return false;
}
}
return true;
} catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError(
- "Link constraint evaluation error", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
return false;
}
}
@@ -857,55 +759,31 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canExistInformationFlow_4021(Package container,
- InformationFlow linkInstance, NamedElement source,
- NamedElement target) {
+ public boolean canExistInformationFlow_4021(Package container, InformationFlow linkInstance, NamedElement source, NamedElement target) {
try {
- // Information Flow source constraint
- if (source != null) {
- if (!((source instanceof Actor) || (source instanceof Node)
- || (source instanceof UseCase)
- || (source instanceof Artifact)
- || (source instanceof Class)
- || (source instanceof Component)
- || (source instanceof Port)
- || (source instanceof Property)
- || (source instanceof Interface)
- || (source instanceof Package)
- || (source instanceof ActivityNode)
- || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
+ //Information Flow source constraint
+ if(source != null) {
+ if(!((source instanceof Actor) || (source instanceof Node) || (source instanceof UseCase) || (source instanceof Artifact) || (source instanceof Class) || (source instanceof Component) || (source instanceof Port) || (source instanceof Property) || (source instanceof Interface) || (source instanceof Package) || (source instanceof ActivityNode) || (source instanceof ActivityPartition) || (source instanceof InstanceSpecification))) {
return false;
}
- if (source instanceof InstanceSpecification) {
- EList<Classifier> classes = ((InstanceSpecification) source)
- .getClassifiers();
- for (int i = 0; i < classes.size(); i++) {
- if (classes.get(i) instanceof Relationship) {
+ if(source instanceof InstanceSpecification) {
+ EList<Classifier> classes = ((InstanceSpecification)source).getClassifiers();
+ for(int i = 0; i < classes.size(); i++) {
+ if(classes.get(i) instanceof Relationship) {
return false;
}
}
}
}
- // Information Flow target constraint
- if (target != null) {
- if (!((target instanceof Actor) || (target instanceof Node)
- || (target instanceof UseCase)
- || (target instanceof Artifact)
- || (target instanceof Class)
- || (target instanceof Component)
- || (target instanceof Port)
- || (target instanceof Property)
- || (target instanceof Interface)
- || (target instanceof Package)
- || (target instanceof ActivityNode)
- || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
+ //Information Flow target constraint
+ if(target != null) {
+ if(!((target instanceof Actor) || (target instanceof Node) || (target instanceof UseCase) || (target instanceof Artifact) || (target instanceof Class) || (target instanceof Component) || (target instanceof Port) || (target instanceof Property) || (target instanceof Interface) || (target instanceof Package) || (target instanceof ActivityNode) || (target instanceof ActivityPartition) || (target instanceof InstanceSpecification))) {
return false;
}
- if (target instanceof InstanceSpecification) {
- EList<Classifier> classes = ((InstanceSpecification) target)
- .getClassifiers();
- for (int i = 0; i < classes.size(); i++) {
- if (classes.get(i) instanceof Relationship) {
+ if(target instanceof InstanceSpecification) {
+ EList<Classifier> classes = ((InstanceSpecification)target).getClassifiers();
+ for(int i = 0; i < classes.size(); i++) {
+ if(classes.get(i) instanceof Relationship) {
return false;
}
}
@@ -913,8 +791,7 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
}
return true;
} catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError(
- "Link constraint evaluation error", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError("Link constraint evaluation error", e); //$NON-NLS-1$
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
index 1a043a81098..8606a98d06b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src/org/eclipse/papyrus/uml/diagram/composite/part/UMLVisualIDRegistry.java
@@ -95,13 +95,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return CompositeStructureDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return CompositeStructureDiagramEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
index 75ab6bef941..ed78735c02d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF
@@ -64,13 +64,12 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.properties,
org.eclipse.emf.ecore.edit,
org.eclipse.emf.validation,
org.eclipse.gef,
- org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.part.UMLD
- iagramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment;single
- ton:=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.deployment.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.deployment; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/CreateDeploymentDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/CreateDeploymentDiagramWithNavigationHandler.java
deleted file mode 100644
index edce61764ef..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/CreateDeploymentDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.deployment;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateDeploymentDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateDeploymentDiagramWithNavigationHandler() {
- super(new CreateDeploymentDiagramCommand(), new DeploymentDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/DeploymentDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/DeploymentDiagramCreationCondition.java
index f7487318013..2262cb88583 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/DeploymentDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/DeploymentDiagramCreationCondition.java
@@ -23,9 +23,6 @@ public class DeploymentDiagramCreationCondition extends PerspectiveContextDepend
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
index 7c65f327469..d029f565858 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/plugin.xml
@@ -75,79 +75,6 @@
</command>
</extension>
<extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand"
- icon="icons/obj16/DeploymentDiagram.gif"
- label="Create a new Deployment Diagram"
- style="push"
- tooltip="Create a new Deployment Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel">
- </reference>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand"
- icon="icons/obj16/DeploymentDiagram.gif"
- label="Create a new Deployment Diagram"
- style="push"
- tooltip="Create a new Deployment Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel">
- </reference>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.deployment.CreateDeploymentDiagramCommand"
- icon="icons/obj16/DeploymentDiagram.gif"
- label="Create a new Deployment Diagram"
- style="push"
- tooltip="Create a new Deployment Diagram">
- <visibleWhen>
- <reference
- definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel">
- </reference>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
<editorDiagram
actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
index 363e38ddf1b..9221c47b08a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommand.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class ArtifactCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class ArtifactCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ArtifactCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ArtifactCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ArtifactCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ArtifactCreateCommand(req, eObject);
+ public static ArtifactCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ArtifactCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ArtifactCreateCommand(CreateElementRequest req) {
+ public ArtifactCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class ArtifactCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,30 +83,31 @@ public class ArtifactCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_2006(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -120,5 +125,4 @@ public class ArtifactCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
index ddd5abcbb76..f3608f9825b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandACN.java
@@ -14,10 +14,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -27,7 +31,7 @@ public class ArtifactCreateCommandACN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -37,24 +41,25 @@ public class ArtifactCreateCommandACN extends EditElementCommand {
/**
* @generated
*/
- public ArtifactCreateCommandACN(CreateElementRequest req, EObject eObject) {
+ public ArtifactCreateCommandACN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ArtifactCreateCommandACN create(CreateElementRequest req, EObject eObject) {
- return new ArtifactCreateCommandACN(req, eObject);
+ public static ArtifactCreateCommandACN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ArtifactCreateCommandACN(req, eObject, diagram);
}
/**
* @generated
*/
- public ArtifactCreateCommandACN(CreateElementRequest req) {
+ public ArtifactCreateCommandACN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -63,7 +68,6 @@ public class ArtifactCreateCommandACN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -78,25 +82,31 @@ public class ArtifactCreateCommandACN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- Artifact owner = (Artifact)getElementToEdit();
- owner.getNestedArtifacts().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Artifact qualifiedTarget = (Artifact)target;
+ qualifiedTarget.getNestedArtifacts().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_28(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -114,5 +124,4 @@ public class ArtifactCreateCommandACN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
index 11f3c020e92..07e381f8afc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ArtifactCreateCommandCN.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ArtifactCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ArtifactCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ArtifactCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ArtifactCreateCommandCN(req, eObject);
+ public static ArtifactCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ArtifactCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ArtifactCreateCommandCN(CreateElementRequest req) {
+ public ArtifactCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,25 +83,31 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_25(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -115,5 +125,4 @@ public class ArtifactCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
index c746c50a0bb..43a4898330f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentAnnotatedElementCreateCommand.java
@@ -65,12 +65,10 @@ public class CommentAnnotatedElementCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getAnnotatedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
index d5e5aad23fb..c242e35bd0d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommand.java
@@ -14,12 +14,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -29,7 +33,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -39,24 +43,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -65,7 +70,6 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -80,30 +84,31 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_2001(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -121,5 +126,4 @@ public class CommentCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
index 08cc5a20c06..4709a83bf85 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/CommentCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_54(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class CommentCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
index 3bcc6c5dcaa..f6da5fa7b41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintConstrainedElementCreateCommand.java
@@ -65,12 +65,10 @@ public class ConstraintConstrainedElementCreateCommand extends EditElementComman
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getConstrainedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
index 377ed3c42e4..c741d1f670f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommand.java
@@ -14,12 +14,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -29,7 +33,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -39,24 +43,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -65,7 +70,6 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -80,32 +84,33 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Namespace childHolder = (Namespace)getElementToEdit();
childHolder.getOwnedRules().add(newElement);
-
ElementInitializers.getInstance().init_Constraint_2005(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -123,5 +128,4 @@ public class ConstraintCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
index 03103cb70f3..0c1dffe607e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ConstraintCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_56(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DefaultNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DefaultNamedElementCreateCommand.java
index 8b7176c2472..46c69bc95e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DefaultNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DefaultNamedElementCreateCommand.java
@@ -23,8 +23,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DefaultNamedElementCreateCommand(req, eObject);
+ public static DefaultNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DefaultNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DefaultNamedElementCreateCommand(CreateElementRequest req) {
+ public DefaultNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -70,7 +75,6 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -85,16 +89,15 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
throw new UnsupportedOperationException("Unimplemented operation (abstract domain element).");
}
@@ -111,5 +114,4 @@ public class DefaultNamedElementCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
index 8397d7f43be..1144b3529e2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyBranchCreateCommand.java
@@ -90,7 +90,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -99,7 +98,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class DependencyBranchCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
index 7e24b33274b..f45a9b2d0e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyCreateCommand.java
@@ -81,7 +81,6 @@ public class DependencyCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -90,7 +89,6 @@ public class DependencyCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -154,5 +152,4 @@ public class DependencyCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
index 33273e12592..c7c67c6334f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DependencyNodeCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DependencyNodeCreateCommand(req, eObject);
+ public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DependencyNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -72,7 +77,6 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -87,23 +91,30 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -121,5 +132,4 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
index 3f7fce14dc7..5470a05c9b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeploymentCreateCommand.java
@@ -81,7 +81,6 @@ public class DeploymentCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Deployment newElement = UMLFactory.eINSTANCE.createDeployment();
getContainer().getDeployments().add(newElement);
newElement.getClients().add(getSource());
@@ -90,7 +89,6 @@ public class DeploymentCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -154,5 +152,4 @@ public class DeploymentCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
index 10a66b54d09..daddda9922a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommand.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class DeviceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class DeviceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DeviceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DeviceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeviceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DeviceCreateCommand(req, eObject);
+ public static DeviceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeviceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DeviceCreateCommand(CreateElementRequest req) {
+ public DeviceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class DeviceCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,30 +83,31 @@ public class DeviceCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Device_2003(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -120,5 +125,4 @@ public class DeviceCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
index bc450bb1af0..9d3d053bf98 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/DeviceCreateCommandCN.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class DeviceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class DeviceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DeviceCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DeviceCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DeviceCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DeviceCreateCommandCN(req, eObject);
+ public static DeviceCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DeviceCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DeviceCreateCommandCN(CreateElementRequest req) {
+ public DeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class DeviceCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,25 +83,31 @@ public class DeviceCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- Node owner = (Node)getElementToEdit();
- owner.getNestedNodes().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Node qualifiedTarget = (Node)target;
+ qualifiedTarget.getNestedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Device_16(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -115,5 +125,4 @@ public class DeviceCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
index 49996afe0dc..ddce7ec9f61 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommand.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExecutionEnvironmentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExecutionEnvironmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExecutionEnvironmentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExecutionEnvironmentCreateCommand(req, eObject);
+ public static ExecutionEnvironmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExecutionEnvironmentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExecutionEnvironmentCreateCommand(CreateElementRequest req) {
+ public ExecutionEnvironmentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,30 +83,31 @@ public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExecutionEnvironment_2002(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -120,5 +125,4 @@ public class ExecutionEnvironmentCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
index 2ea1a2b764f..8758c3ecd18 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ExecutionEnvironmentCreateCommandCN.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExecutionEnvironmentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ExecutionEnvironmentCreateCommandCN(req, eObject);
+ public static ExecutionEnvironmentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExecutionEnvironmentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req) {
+ public ExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,25 +83,31 @@ public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- Node owner = (Node)getElementToEdit();
- owner.getNestedNodes().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Node qualifiedTarget = (Node)target;
+ qualifiedTarget.getNestedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExecutionEnvironment_21(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -115,5 +125,4 @@ public class ExecutionEnvironmentCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
index 0e56bee9f85..8596ce26c44 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/GeneralizationCreateCommand.java
@@ -79,7 +79,6 @@ public class GeneralizationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
getContainer().getGeneralizations().add(newElement);
newElement.setSpecific(getSource());
@@ -87,7 +86,6 @@ public class GeneralizationCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -151,5 +149,4 @@ public class GeneralizationCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
index fac32b701e6..023dd9cd103 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ManifestationCreateCommand.java
@@ -81,7 +81,6 @@ public class ManifestationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Manifestation newElement = UMLFactory.eINSTANCE.createManifestation();
getContainer().getManifestations().add(newElement);
newElement.getClients().add(getSource());
@@ -90,7 +89,6 @@ public class ManifestationCreateCommand extends EditElementCommand {
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -154,5 +152,4 @@ public class ManifestationCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
index d460d46b64f..d6c77a4f9fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommand.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommand(req, eObject);
+ public static ModelCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommand(CreateElementRequest req) {
+ public ModelCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class ModelCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class ModelCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_2010(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class ModelCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
index bd678a8710b..b20cec0ddb5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/ModelCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandCN(req, eObject);
+ public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req) {
+ public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_49(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class ModelCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
index fa9e9852fd0..67b4acfd2ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedArtifactNodeCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Artifact;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public NestedArtifactNodeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NestedArtifactNodeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedArtifactNodeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NestedArtifactNodeCreateCommandCN(req, eObject);
+ public static NestedArtifactNodeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedArtifactNodeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedArtifactNodeCreateCommandCN(CreateElementRequest req) {
+ public NestedArtifactNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getArtifact());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Artifact newElement = UMLFactory.eINSTANCE.createArtifact();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Artifact_40(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class NestedArtifactNodeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
index 0168401cb7a..1a95cc92d00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedDeviceCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Device;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedDeviceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedDeviceCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public NestedDeviceCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NestedDeviceCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedDeviceCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NestedDeviceCreateCommandCN(req, eObject);
+ public static NestedDeviceCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedDeviceCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedDeviceCreateCommandCN(CreateElementRequest req) {
+ public NestedDeviceCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class NestedDeviceCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class NestedDeviceCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDevice());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Device newElement = UMLFactory.eINSTANCE.createDevice();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Device_44(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class NestedDeviceCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
index ffd2d20f3e3..19c2af5034e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedExecutionEnvironmentCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExecutionEnvironment;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedExecutionEnvironmentCreateCommandCN extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedExecutionEnvironmentCreateCommandCN extends EditElementComman
/**
* @generated
*/
- public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedExecutionEnvironmentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NestedExecutionEnvironmentCreateCommandCN(req, eObject);
+ public static NestedExecutionEnvironmentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedExecutionEnvironmentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req) {
+ public NestedExecutionEnvironmentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class NestedExecutionEnvironmentCreateCommandCN extends EditElementComman
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class NestedExecutionEnvironmentCreateCommandCN extends EditElementComman
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExecutionEnvironment());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
ExecutionEnvironment newElement = UMLFactory.eINSTANCE.createExecutionEnvironment();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExecutionEnvironment_46(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class NestedExecutionEnvironmentCreateCommandCN extends EditElementComman
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
index 6423449b2ff..dc49870ad2a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NestedNodeCreateCommandCN.java
@@ -23,11 +23,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class NestedNodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class NestedNodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public NestedNodeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NestedNodeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NestedNodeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NestedNodeCreateCommandCN(req, eObject);
+ public static NestedNodeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NestedNodeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NestedNodeCreateCommandCN(CreateElementRequest req) {
+ public NestedNodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -73,7 +78,6 @@ public class NestedNodeCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -88,25 +92,31 @@ public class NestedNodeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Node newElement = UMLFactory.eINSTANCE.createNode();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Node_42(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -124,5 +134,4 @@ public class NestedNodeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
index 7d2729caa09..eb8104fd829 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommand.java
@@ -14,11 +14,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -28,7 +32,7 @@ public class NodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -38,24 +42,25 @@ public class NodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public NodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public NodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new NodeCreateCommand(req, eObject);
+ public static NodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public NodeCreateCommand(CreateElementRequest req) {
+ public NodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -64,7 +69,6 @@ public class NodeCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,30 +83,31 @@ public class NodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Node newElement = UMLFactory.eINSTANCE.createNode();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Node_2008(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -120,5 +125,4 @@ public class NodeCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
index d96fcda1a6b..a3b1ec14ddf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/NodeCreateCommandCN.java
@@ -14,10 +14,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Node;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -27,7 +31,7 @@ public class NodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -37,24 +41,25 @@ public class NodeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public NodeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public NodeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static NodeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new NodeCreateCommandCN(req, eObject);
+ public static NodeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new NodeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public NodeCreateCommandCN(CreateElementRequest req) {
+ public NodeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -63,7 +68,6 @@ public class NodeCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -78,25 +82,31 @@ public class NodeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNode());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Node newElement = UMLFactory.eINSTANCE.createNode();
-
- Node owner = (Node)getElementToEdit();
- owner.getNestedNodes().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Node qualifiedTarget = (Node)target;
+ qualifiedTarget.getNestedNodes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Node_23(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -114,5 +124,4 @@ public class NodeCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
index 03acf3c9664..417814a5359 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommand.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommand(req, eObject);
+ public static PackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req) {
+ public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -72,7 +77,6 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -87,30 +91,31 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- // Creation constraint for TopLevelNodes
- if(!(getElementToEdit() instanceof Package)) {
- return false;
- }
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_2009(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -128,5 +133,4 @@ public class PackageCreateCommand extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
index 50621e5dfc6..55c3c45537b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/commands/PackageCreateCommandCN.java
@@ -23,10 +23,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.deployment.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -36,7 +40,7 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -46,24 +50,25 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandCN(req, eObject);
+ public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req) {
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -72,7 +77,6 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -87,25 +91,31 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_36(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -123,5 +133,4 @@ public class PackageCreateCommandCN extends EditElementCommand {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
index 7e4b52766da..d2ae309baa4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicy.java
@@ -135,7 +135,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicy extends CanonicalEd
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -155,7 +154,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicy extends CanonicalEd
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
index 9611e2322b0..c5fb4f0e77e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyACN.java
@@ -135,7 +135,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicyACN extends Canonica
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -155,7 +154,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicyACN extends Canonica
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
index 6d80ac78864..3883321c369 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentCanonicalEditPolicyCN.java
@@ -135,7 +135,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicyCN extends Canonical
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -155,7 +154,6 @@ public class ArtifactCompositeCompartmentCanonicalEditPolicyCN extends Canonical
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicy.java
index b9ddf1d947d..18c08c1976e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicy.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandACN;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
@@ -44,14 +45,11 @@ public class ArtifactCompositeCompartmentItemSemanticEditPolicy extends UMLBaseI
}
}
if(UMLElementTypes.Artifact_28 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandACN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandACN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyACN.java
index e0d26ac520f..1f37d7eee65 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyACN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandACN;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
@@ -44,14 +45,11 @@ public class ArtifactCompositeCompartmentItemSemanticEditPolicyACN extends UMLBa
}
}
if(UMLElementTypes.Artifact_28 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandACN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandACN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
index 7b0cb696110..961e097ffc1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandACN;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
@@ -44,14 +45,11 @@ public class ArtifactCompositeCompartmentItemSemanticEditPolicyCN extends UMLBas
}
}
if(UMLElementTypes.Artifact_28 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandACN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandACN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
index 3021588aedf..154eadb7331 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicy.java
@@ -56,7 +56,6 @@ public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -238,5 +237,4 @@ public class ArtifactItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
index 8f8d2c6c894..4f6733e29f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyACN.java
@@ -71,7 +71,6 @@ public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPo
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -101,7 +100,6 @@ public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPo
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ArtifactEditPartACN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -122,7 +120,6 @@ public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPo
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -322,5 +319,4 @@ public class ArtifactItemSemanticEditPolicyACN extends UMLBaseItemSemanticEditPo
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
index d00b477068e..c579663f8a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ArtifactItemSemanticEditPolicyCN.java
@@ -61,7 +61,6 @@ public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -251,5 +250,4 @@ public class ArtifactItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
index 4f847e63895..721feedd842 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java
@@ -26,5 +26,4 @@ public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSe
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
index cc9c4be7105..8e14bed974f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicy.java
@@ -45,7 +45,6 @@ public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -143,5 +142,4 @@ public class CommentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
index bec229b1b69..7d3320c9e28 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/CommentItemSemanticEditPolicyCN.java
@@ -55,7 +55,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -161,5 +160,4 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
index 75610be4a83..6f540abedd1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java
@@ -26,5 +26,4 @@ public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseI
protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
index dc757703254..1933cefebdb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicy.java
@@ -54,7 +54,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -226,5 +225,4 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
index 6f5ed3fc625..a7aa60f82d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ConstraintItemSemanticEditPolicyCN.java
@@ -68,7 +68,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -248,5 +247,4 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
index 26c06f7261e..aafca2c11b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DefaultNamedElementItemSemanticEditPolicy.java
@@ -68,7 +68,6 @@ public class DefaultNamedElementItemSemanticEditPolicy extends UMLBaseItemSemant
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -245,5 +244,4 @@ public class DefaultNamedElementItemSemanticEditPolicy extends UMLBaseItemSemant
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
index d2a59972c48..7dd48f16cc0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyBranchItemSemanticEditPolicy.java
@@ -63,7 +63,6 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -232,5 +231,4 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
index 2f5d0545ddf..b0d11609a01 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyItemSemanticEditPolicy.java
@@ -54,7 +54,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -223,5 +222,4 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
index 105a73be8bb..791f5d8d210 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DependencyNodeItemSemanticEditPolicy.java
@@ -63,7 +63,6 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -232,5 +231,4 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentDiagramItemSemanticEditPolicy.java
index 5ccb6d809cf..480aad80635 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentDiagramItemSemanticEditPolicy.java
@@ -12,6 +12,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommand;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentCreateCommand;
@@ -58,84 +59,64 @@ public class DeploymentDiagramItemSemanticEditPolicy extends UMLBaseItemSemantic
}
}
if(UMLElementTypes.Dependency_2011 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DependencyNodeCreateCommand(req));
-
+ return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_2010 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommand(req));
-
+ return getGEFWrapper(new ModelCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_2009 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommand(req));
-
+ return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_2005 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
-
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_2001 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
-
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_2002 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommand(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_2003 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCreateCommand(req));
-
+ return getGEFWrapper(new DeviceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_2006 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommand(req));
-
+ return getGEFWrapper(new ArtifactCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_2008 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCreateCommand(req));
-
+ return getGEFWrapper(new NodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2012 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DefaultNamedElementCreateCommand(req));
-
+ return getGEFWrapper(new DefaultNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -170,5 +151,4 @@ public class DeploymentDiagramItemSemanticEditPolicy extends UMLBaseItemSemantic
this.diagram = currentDiagram;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
index 519d04faeeb..8278554789c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeploymentItemSemanticEditPolicy.java
@@ -54,7 +54,6 @@ public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -223,5 +222,4 @@ public class DeploymentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
index af4e4845694..e99fcd0f953 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicy.java
@@ -138,7 +138,6 @@ public class DeviceCompositeCompartmentCanonicalEditPolicy extends CanonicalEdit
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -158,7 +157,6 @@ public class DeviceCompositeCompartmentCanonicalEditPolicy extends CanonicalEdit
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
index 07f38824228..b172da68a30 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentCanonicalEditPolicyCN.java
@@ -138,7 +138,6 @@ public class DeviceCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEd
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -158,7 +157,6 @@ public class DeviceCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEd
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
index 8ef56524e57..84934f500b9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicy.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeviceCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.NodeCreateCommandCN;
@@ -46,30 +47,23 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicy extends UMLBaseIte
}
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_16 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new DeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_23 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
index 9d71b5e6797..7714f0434e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeviceCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.NodeCreateCommandCN;
@@ -46,30 +47,23 @@ public class DeviceCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseI
}
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_16 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new DeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_23 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
index 4eb4d8b0fb3..5d8f95d3f50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicy.java
@@ -56,7 +56,6 @@ public class DeviceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -238,5 +237,4 @@ public class DeviceItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
index 3648563fb84..dc65b5e31d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/DeviceItemSemanticEditPolicyCN.java
@@ -61,7 +61,6 @@ public class DeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolic
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -251,5 +250,4 @@ public class DeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolic
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
index 2d357eb5714..d6b6cedf043 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy.java
@@ -149,7 +149,6 @@ public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy extends
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -169,7 +168,6 @@ public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicy extends
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
index cbb798753e5..4116795bb67 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN.java
@@ -149,7 +149,6 @@ public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN exten
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -169,7 +168,6 @@ public class ExecutionEnvironmentCompositeCompartmentCanonicalEditPolicyCN exten
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
index bfd5ed25b2e..b106d1ba25c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
@@ -45,22 +46,17 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicy exte
}
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_25 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
index 0c7276bfd1b..c50610835cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.providers.UMLElementTypes;
@@ -45,22 +46,17 @@ public class ExecutionEnvironmentCompositeCompartmentItemSemanticEditPolicyCN ex
}
}
if(UMLElementTypes.Artifact_25 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
index c9f4e556188..7d6cd8f2362 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicy.java
@@ -56,7 +56,6 @@ public class ExecutionEnvironmentItemSemanticEditPolicy extends UMLBaseItemSeman
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -238,5 +237,4 @@ public class ExecutionEnvironmentItemSemanticEditPolicy extends UMLBaseItemSeman
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
index aa9206e986a..4f74cf43830 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ExecutionEnvironmentItemSemanticEditPolicyCN.java
@@ -61,7 +61,6 @@ public class ExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSem
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -251,5 +250,4 @@ public class ExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseItemSem
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
index 51cd950e164..acc5457995a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/GeneralizationItemSemanticEditPolicy.java
@@ -45,7 +45,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -140,5 +139,4 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
index 0df033b4cb0..f7162b60d84 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ManifestationItemSemanticEditPolicy.java
@@ -54,7 +54,6 @@ public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -223,5 +222,4 @@ public class ManifestationItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
index 78d63c1419f..61a409eb341 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelCanonicalEditPolicy.java
@@ -199,7 +199,6 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -214,17 +213,13 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
if(changed || createdViews.size() > 0) {
postProcessRefreshSemantic(createdViews);
}
-
Collection<IAdaptable> createdConnectionViews = refreshConnections();
-
if(createdViews.size() > 1) {
// perform a layout of the container
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
createdViews.addAll(createdConnectionViews);
-
makeViewsImmutable(createdViews);
}
@@ -612,6 +607,5 @@ public class ModelCanonicalEditPolicy extends CanonicalEditPolicy {
this.put(domainElement, view);
}
}
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
index 1fef49c95de..d492965233f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicy.java
@@ -86,7 +86,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -116,7 +115,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ModelEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -136,7 +134,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -155,7 +152,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -175,7 +171,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -194,7 +189,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedDeviceEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -215,7 +209,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -235,7 +228,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -256,7 +248,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -276,7 +267,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedNodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -297,7 +287,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -317,7 +306,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedArtifactNodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -338,7 +326,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -358,7 +345,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case CommentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -370,7 +356,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -386,7 +371,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -406,7 +390,6 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -597,5 +580,4 @@ public class ModelItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
index 13749ed4200..ce2b2507915 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelItemSemanticEditPolicyCN.java
@@ -86,7 +86,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -116,7 +115,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ModelEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -136,7 +134,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -155,7 +152,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -175,7 +171,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -194,7 +189,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedDeviceEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -215,7 +209,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -235,7 +228,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedExecutionEnvironmentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -256,7 +248,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -276,7 +267,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedNodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -297,7 +287,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -317,7 +306,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NestedArtifactNodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -338,7 +326,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -358,7 +345,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case CommentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -370,7 +356,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -386,7 +371,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -406,7 +390,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -597,5 +580,4 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
index 6ac66714db1..b4517a47cf1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicy.java
@@ -176,7 +176,6 @@ public class ModelPackageableElementCompartmentCanonicalEditPolicy extends Canon
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -196,7 +195,6 @@ public class ModelPackageableElementCompartmentCanonicalEditPolicy extends Canon
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
index d00261427be..49b42eddd9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentCanonicalEditPolicyCN.java
@@ -176,7 +176,6 @@ public class ModelPackageableElementCompartmentCanonicalEditPolicyCN extends Can
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -196,7 +195,6 @@ public class ModelPackageableElementCompartmentCanonicalEditPolicyCN extends Can
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
index fccba8927f5..dee5581dd9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ModelCreateCommandCN;
@@ -60,70 +61,53 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicy extends UM
}
}
if(UMLElementTypes.Model_49 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
-
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_36 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
-
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_44 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedDeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_46 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_42 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_40 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_54 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
-
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_56 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
-
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index ac2e1303b3b..a390e1a99a2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ModelCreateCommandCN;
@@ -60,70 +61,53 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
}
}
if(UMLElementTypes.Model_49 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
-
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_36 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
-
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_44 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedDeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_46 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_42 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_40 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_54 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
-
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_56 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
-
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
index 8d61e43fd5f..cbc6c6c8483 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedArtifactNodeItemSemanticEditPolicyCN.java
@@ -80,7 +80,6 @@ public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSeman
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -110,7 +109,6 @@ public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSeman
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ArtifactEditPartACN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -131,7 +129,6 @@ public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSeman
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -331,5 +328,4 @@ public class NestedArtifactNodeItemSemanticEditPolicyCN extends UMLBaseItemSeman
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
index 1027359b392..d817feab906 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedDeviceItemSemanticEditPolicyCN.java
@@ -82,7 +82,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -112,7 +111,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -133,7 +131,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -153,7 +150,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DeviceEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -174,7 +170,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -194,7 +189,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -215,7 +209,6 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -415,5 +408,4 @@ public class NestedDeviceItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
index 7973af0304d..a4dd32e8314 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedExecutionEnvironmentItemSemanticEditPolicyCN.java
@@ -81,7 +81,6 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -111,7 +110,6 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ArtifactEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -132,7 +130,6 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -152,7 +149,6 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -173,7 +169,6 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -373,5 +368,4 @@ public class NestedExecutionEnvironmentItemSemanticEditPolicyCN extends UMLBaseI
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
index 2258a034168..12b58a32082 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NestedNodeItemSemanticEditPolicyCN.java
@@ -83,7 +83,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -113,7 +112,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DeviceEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -134,7 +132,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -154,7 +151,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ExecutionEnvironmentEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -175,7 +171,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -195,7 +190,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case NodeEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -216,7 +210,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -236,7 +229,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ArtifactEditPartCN.VISUAL_ID:
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -257,7 +249,6 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
break;
}
}
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -457,5 +448,4 @@ public class NestedNodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
index ba01e428e03..779c0d2ee15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicy.java
@@ -158,7 +158,6 @@ public class NodeCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPo
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -178,7 +177,6 @@ public class NodeCompositeCompartmentCanonicalEditPolicy extends CanonicalEditPo
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
index 926e90bc1ce..8b2275a3a00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentCanonicalEditPolicyCN.java
@@ -158,7 +158,6 @@ public class NodeCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEdit
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -178,7 +177,6 @@ public class NodeCompositeCompartmentCanonicalEditPolicyCN extends CanonicalEdit
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
index 2a6acdedddb..516a6513659 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicy.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeviceCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
@@ -47,38 +48,29 @@ public class NodeCompositeCompartmentItemSemanticEditPolicy extends UMLBaseItemS
}
}
if(UMLElementTypes.Device_16 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new DeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_25 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_23 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
index 89169279fe2..a39f11df3fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeCompositeCompartmentItemSemanticEditPolicyCN.java
@@ -8,6 +8,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ArtifactCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.DeviceCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ExecutionEnvironmentCreateCommandCN;
@@ -47,38 +48,29 @@ public class NodeCompositeCompartmentItemSemanticEditPolicyCN extends UMLBaseIte
}
}
if(UMLElementTypes.Device_16 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new DeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_21 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new ExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_23 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_25 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ArtifactCreateCommandCN(req));
-
+ return getGEFWrapper(new ArtifactCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
index 849eba0a449..a38377167cd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicy.java
@@ -56,7 +56,6 @@ public class NodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -238,5 +237,4 @@ public class NodeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
index 3eb09875c06..42b7171a8be 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/NodeItemSemanticEditPolicyCN.java
@@ -61,7 +61,6 @@ public class NodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
View view = (View)getHost().getModel();
CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(true);
-
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation == null) {
// there are indirectly referenced children, need extra commands: false
@@ -251,5 +250,4 @@ public class NodeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
index b1f25cefaad..5bdc116cfde 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicy.java
@@ -63,7 +63,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -232,5 +231,4 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
index bf53705977d..2fca56de831 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -63,7 +63,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
if(provider != null) {
// Retrieve delete command from the Element Edit service
ICommand deleteCommand = provider.getEditCommand(req);
-
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -232,5 +231,4 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
}
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
index 475ee1ff2ab..74194f9c8f0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicy.java
@@ -176,7 +176,6 @@ public class PackagePackageableElementCompartmentCanonicalEditPolicy extends Can
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -196,7 +195,6 @@ public class PackagePackageableElementCompartmentCanonicalEditPolicy extends Can
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
index d7134df0e90..a5254c11c2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentCanonicalEditPolicyCN.java
@@ -174,7 +174,6 @@ public class PackagePackageableElementCompartmentCanonicalEditPolicyCN extends C
CreateViewRequest.ViewDescriptor descriptor = new CreateViewRequest.ViewDescriptor(elementAdapter, Node.class, hint, ViewUtil.APPEND, false, host().getDiagramPreferencesHint());
viewDescriptors.add(descriptor);
}
-
boolean changed = deleteViews(orphaned.iterator());
//
CreateViewRequest request = getCreateViewRequest(viewDescriptors);
@@ -194,7 +193,6 @@ public class PackagePackageableElementCompartmentCanonicalEditPolicyCN extends C
DeferredLayoutCommand layoutCmd = new DeferredLayoutCommand(host().getEditingDomain(), createdViews, host());
executeCommand(new ICommandProxy(layoutCmd));
}
-
makeViewsImmutable(createdViews);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index b4f9928616b..e8d1600f87d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ModelCreateCommandCN;
@@ -60,70 +61,53 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
}
}
if(UMLElementTypes.Model_49 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
-
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_36 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
-
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_40 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_44 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedDeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_46 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_42 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_54 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
-
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_56 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
-
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index 486a22252c7..e96e91148d8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.deployment.edit.commands.NestedArtifactNodeCreateCommandCN;
@@ -59,62 +60,47 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
}
}
if(UMLElementTypes.Package_36 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
-
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Artifact_40 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedArtifactNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Device_44 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedDeviceCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedDeviceCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ExecutionEnvironment_46 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedExecutionEnvironmentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Node_42 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new NestedNodeCreateCommandCN(req));
-
+ return getGEFWrapper(new NestedNodeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_54 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
-
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_56 == baseElementType) {
-
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
-
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
index fff856b1b66..fc62e739330 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -301,7 +301,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
protected Command getMoveCommand(MoveRequest req) {
-
EObject targetCEObject = req.getTargetContainer();
if(targetCEObject != null) {
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
@@ -315,7 +314,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
} else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
@@ -399,13 +397,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
public boolean canCreateCommentAnnotatedElement_4008(Comment source, Element target) {
if(source != null) {
- if(source.getAnnotatedElements().contains(target)
-
- ) {
+ if(source.getAnnotatedElements().contains(target)) {
return false;
}
}
-
return canExistCommentAnnotatedElement_4008(source, target);
}
@@ -414,13 +409,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
public boolean canCreateConstraintConstrainedElement_4009(Constraint source, Element target) {
if(source != null) {
- if(source.getConstrainedElements().contains(target)
-
- ) {
+ if(source.getConstrainedElements().contains(target)) {
return false;
}
}
-
return canExistConstraintConstrainedElement_4009(source, target);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
index 7949a7dabdc..b6c7c42c732 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src/org/eclipse/papyrus/uml/diagram/deployment/part/UMLVisualIDRegistry.java
@@ -153,13 +153,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return DeploymentDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return DeploymentDiagramEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF
index f5cade54750..9b1bf302821 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF
@@ -39,7 +39,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.hyperlink;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0"
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.interactionoverview,
org.eclipse.papyrus.uml.diagram.interactionoverview.edit.advices,
org.eclipse.papyrus.uml.diagram.interactionoverview.edit.commands,
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml
index 0a86de89142..02dd78ac26b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/plugin.xml
@@ -39,70 +39,8 @@
categoryId="org.eclipse.papyrus.editor.category"/>
</extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateInteractionOverviewDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </with>
- </activeWhen>
- </handler>
- </extension>
<!-- Diagram creation command registration in menu and toolbar -->
- <extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
- icon="icons/obj16/interactionOverviewDiagram.gif"
- label="Create a new Interaction Overview Diagram"
- style="push"
- tooltip="Create a new Interaction Overview Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
- icon="icons/obj16/interactionOverviewDiagram.gif"
- label="Create a new Interaction Overview Diagram"
- style="push"
- tooltip="Create a new Interaction Overview Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.interactionoverview.CreateCommand"
- icon="icons/obj16/interactionOverviewDiagram.gif"
- label="Create a new Interaction Overview Diagram"
- style="push"
- tooltip="Create a new Interaction Overview Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
- </extension>
<!-- Palette tool declaration (declares the real palette containment) -->
<extension
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreateCommand.java
index 2363c9481f8..4e63467794f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreateCommand.java
@@ -1,19 +1,19 @@
/*****************************************************************************
* 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Refactoring for viewpoints
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.interactionoverview;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
import org.eclipse.papyrus.uml.diagram.interactionoverview.provider.ElementTypes;
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.uml.diagram.interactionoverview.provider.ElementTypes
// End of user code
public class InteractionOverviewDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
+
/**
* {@inheritDoc}
*/
@@ -45,18 +45,4 @@ public class InteractionOverviewDiagramCreateCommand extends AbstractPapyrusGmfC
protected PreferencesHint getPreferenceHint() {
return Activator.DIAGRAM_PREFERENCES_HINT;
}
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Diagram createDiagram(final Resource diagramResource, final EObject owner, final String name) {
- // Start of user code Custom diagram creation
- return super.createDiagram(diagramResource, owner, name);
- // End of user code
- }
-
- // Start of user code Custom creation command
-
- // End of user code
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/CreateInteractionOverviewDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/CreateInteractionOverviewDiagramWithNavigationHandler.java
deleted file mode 100644
index 3019c616ffb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/CreateInteractionOverviewDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * 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
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.interactionoverview;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateInteractionOverviewDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateInteractionOverviewDiagramWithNavigationHandler() {
- super(new InteractionOverviewDiagramCreateCommand(), new InteractionOverviewDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreationCondition.java
index e4c56fa5e8e..594dc96bda4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramCreationCondition.java
@@ -24,9 +24,6 @@ public class InteractionOverviewDiagramCreationCondition extends PerspectiveCont
*/
@Override
public boolean create(final EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.project b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.project
deleted file mode 100644
index 72d7ebfc1fb..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.pkg</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/net.sf.jautodoc.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/net.sf.jautodoc.prefs
deleted file mode 100644
index 20a9f2e4cd0..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/net.sf.jautodoc.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Wed Apr 20 16:59:51 CEST 2011
-add_header=true
-eclipse.preferences.version=1
-header_text=/*****************************************************************************\r\n * Copyright (c) 2011 CEA LIST.\r\n *\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *\t\t\r\n *\t\tCEA LIST - Initial API and implementation\r\n *\r\n *****************************************************************************/
-project_specific_settings=true
-replace_header=true
-replacements=<?xml version\="1.0" standalone\="yes"?>\n\n<replacements>\n<replacement key\="get" scope\="1" mode\="0">Gets the</replacement>\n<replacement key\="set" scope\="1" mode\="0">Sets the</replacement>\n<replacement key\="add" scope\="1" mode\="0">Adds the</replacement>\n<replacement key\="edit" scope\="1" mode\="0">Edits the</replacement>\n<replacement key\="remove" scope\="1" mode\="0">Removes the</replacement>\n<replacement key\="init" scope\="1" mode\="0">Inits the</replacement>\n<replacement key\="parse" scope\="1" mode\="0">Parses the</replacement>\n<replacement key\="create" scope\="1" mode\="0">Creates the</replacement>\n<replacement key\="build" scope\="1" mode\="0">Builds the</replacement>\n<replacement key\="is" scope\="1" mode\="0">Checks if is</replacement>\n<replacement key\="print" scope\="1" mode\="0">Prints the</replacement>\n<replacement key\="has" scope\="1" mode\="0">Checks for</replacement>\n</replacements>\n\n
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f98abccaf58..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Jun 23 10:57:27 CEST 2010
-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.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.MF
deleted file mode 100644
index 01361137724..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,35 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.gmf.runtime.diagram.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.emf.common.ui;bundle-version="2.7.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.pkg,
- org.eclipse.papyrus.uml.diagram.pkg.provider
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.pkg.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.pkg;singleton:=tr
- ue
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.gen.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.gen.MF
deleted file mode 100644
index ed2f1ac8f4b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/META-INF/MANIFEST.gen.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.pkg;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.pkg.Activator
-Bundle-Vendor: %providerName
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common,
- org.eclipse.papyrus.infra.gmfdiag.common,
- org.eclipse.gmf.runtime.diagram.ui.providers,
- org.eclipse.gmf.runtime.diagram.ui.resources.editor,
- org.eclipse.papyrus.uml.diagram.clazz,
- org.eclipse.papyrus.preferences
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/about.html b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/about.html
deleted file mode 100644
index d35d5aed64c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.gen.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.gen.properties
deleted file mode 100644
index ca6d14e16f2..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.gen.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/,\
- src-gen/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- palettes/,\
- icons/,\
- about.html,\
- plugin.properties
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.properties
deleted file mode 100644
index 2673bb6e850..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:30:21 CEST 2011
-bin.includes=META-INF/,.,plugin.xml,icons/,palettes/,about.html,plugin.properties
-output..=bin/
-src.includes = about.html
-source..=src/,src-gen/
-bin..=bin/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/model/UML.Package.idgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/model/UML.Package.idgen
deleted file mode 100644
index 2afde6a8147..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/model/UML.Package.idgen
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<idgen:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:idgen="http://www.eclipse.org/papyrus/0.7.0/idgen" name="Package" type="Package" icon="icons/obj16/Diagram_Package.gif" label="UML Package Diagram" language="uml" javaPackagePrefix="org.eclipse.papyrus.uml.diagram.pkg" javaClassPrefix="PackageDiagram" createCommandLabel="Create a new Package Diagram">
- <diagramEditPart name="PackageDiagramEditPart">
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy" key="DuplicatePasteEditPolicy.PASTE_ROLE"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy" key="EditPolicyRoles.SEMANTIC_ROLE"/>
- <behaviors name="" javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy" key="&quot;RemoveOrphanView&quot;"/>
- <behaviors javaClassQualifiedName="org.eclipse.papyrus.uml.diagram.pkg.edit.policy.CustomDragDropEditPolicy" key="EditPolicyRoles.DRAG_DROP_ROLE"/>
- </diagramEditPart>
- <inheritedDiagrams name="ClassDiagram" viewProviderClassQualifiedName="" editPartProviderClassQualifiedName="" dndEditPolicyClassQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy">
- <genInheritedEditor href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#PapyrusUMLClassDiagram"/>
- <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.9"/>
- </genNodes>
- <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage" generatePreferencePage="false" generateTool="false">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.31"/>
- </genNodes>
- <genNodes name="">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.15"/>
- </genNodes>
- <genNodes generatePreferencePage="false" generateTool="false">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.36"/>
- </genNodes>
- <genNodes>
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.14"/>
- </genNodes>
- <genNodes generatePreferencePage="false" generateTool="false">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.37"/>
- </genNodes>
- <genNodes customPreferencePage="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage">
- <genNode xsi:type="gmfgen:GenTopLevelNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@topLevelNodes.7"/>
- </genNodes>
- <genNodes generatePreferencePage="false" generateTool="false">
- <genNode xsi:type="gmfgen:GenChildNode" href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@childNodes.29"/>
- </genNodes>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.10"/>
- </genLinks>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.13"/>
- </genLinks>
- <genLinks name="CommentLink" customPreferencePage="" generatePreferencePage="false" generateTool="false">
- <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.16"/>
- </genLinks>
- <genLinks>
- <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.8"/>
- </genLinks>
- <genLinks generatePreferencePage="false" generateTool="false">
- <genLink href="../../org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.gmfgen#/0/@diagram/@links.17"/>
- </genLinks>
- </inheritedDiagrams>
- <customJavaClasses customEditPolicyProvider="org.eclipse.papyrus.uml.diagram.pkg.provider.CustomEditPolicyProvider"/>
-</idgen:Diagram>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.gen.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.gen.xml
deleted file mode 100644
index 85732802b51..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.gen.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.uml.diagram.pkg.UML_Package__Tools" name="Tools">
- <aspectTool description="Create a new Comment" id="package.tool.comment"
- name="Comment" refToolId="clazz.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="package.tool.constraint"
- name="Constraint" refToolId="clazz.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Model" id="package.tool.model"
- name="Model" refToolId="clazz.tool.model">
- </aspectTool>
- <aspectTool description="Create a new Package" id="package.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Abstraction" id="package.tool.abstraction"
- name="Abstraction" refToolId="clazz.tool.abstraction">
- </aspectTool>
- <aspectTool description="Create a new Dependency" id="package.tool.dependency"
- name="Dependency" refToolId="clazz.tool.dependency">
- </aspectTool>
- <aspectTool description="Create a new PackageImport" id="package.tool.packageimport"
- name="PackageImport" refToolId="clazz.tool.packageimport">
- </aspectTool>
-
- </drawer>
- </content>
-</paletteDefinition>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.xml
deleted file mode 100644
index 0337d15f363..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/palettes/package.palette.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<paletteDefinition>
- <content>
- <drawer
- iconpath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- id="org.eclipse.papyrus.uml.diagram.pkg.UML_Package__Tools" name="Tools">
- <aspectTool description="Create a new Comment" id="package.tool.comment"
- name="Comment" refToolId="clazz.tool.comment">
- </aspectTool>
- <aspectTool description="Create a new Constraint" id="package.tool.constraint"
- name="Constraint" refToolId="clazz.tool.constraint">
- </aspectTool>
- <aspectTool description="Create a new Model" id="package.tool.model"
- name="Model" refToolId="clazz.tool.model">
- </aspectTool>
- <aspectTool description="Create a new Package" id="package.tool.package"
- name="Package" refToolId="clazz.tool.package">
- </aspectTool>
- <aspectTool description="Create a new Abstraction" id="package.tool.abstraction"
- name="Abstraction" refToolId="clazz.tool.abstraction">
- </aspectTool>
- <aspectTool description="Create a new Dependency" id="package.tool.dependency"
- name="Dependency" refToolId="clazz.tool.dependency">
- </aspectTool>
- <aspectTool description="Create a new PackageImport" id="package.tool.packageimport"
- name="PackageImport" refToolId="clazz.tool.packageimport">
- </aspectTool>
- <aspectTool description="Create a new Context link" id="package.tool.contextLink"
- name="ContextLink" refToolId="createContextLink22CreationTool">
- </aspectTool>
-
- <!-- Attention : The element is added manually, can combine the two links comment and constraint, and therefore is not deleted -->
- <aspectTool description="Create a new Link" id="package.tool.link"
- name="Link" refToolId="clazz.tool.link">
- </aspectTool>
-
- </drawer>
-
- </content>
-</paletteDefinition>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.gen.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.gen.xml
deleted file mode 100644
index 068231f66e6..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.gen.xml
+++ /dev/null
@@ -1,423 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand"
- icon="icons/obj16/Diagram_Package.gif"
- id="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- language="uml"
- label="UML Package Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramEditorFactory"
- icon="icons/obj16/Diagram_Package.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- name="Create a new Package Diagram"
- description="Create a new Package Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand"
- commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
- style="push" tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
- style="push" tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif"
- label="Create a new Package Diagram"
- style="push"
- tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="UML_Package">
-
- <paletteDefinition ID="UML_Package"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="UML_Package" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/package.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.uml.diagram.pkg"/>
- </paletteDefinition>
-</extension>
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.PackageDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Package"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2007" = PACKAGE
- "3009" = PACKAGE_CN
- "2012" = COMMENT
- "3028" = COMMENT_CN
- "2011" = CONSTRAINT
- "3029" = CONSTRAINT_CN
- "2005" = MODEL
- "3024" = MODEL_CN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028, 2011, 3029, 2005, 3024"/>
-
- <!--
- "4008" = DEPENDENCY
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4006" = ABSTRACTION
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4006, 4014"/>
-
- <object id="elementtype.node"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="2007, 3009, 2012, 3028, 2011, 3029, 2005, 3024">
- </method>
- </object>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/>
-
- <object id="elementtype.edge"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="4008, 4010, 4013, 4006, 4014">
- </method>
- </object>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/>
-
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Model" -->
- <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Model"/>
- </object>
-
- <!-- "uml.Dependency" -->
- <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Dependency"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.Abstraction" -->
- <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Abstraction"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Comment, uml.Constraint, uml.Model"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.Dependency, uml.PackageImport, uml.Abstraction"/>
-
- </viewProvider>
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.PackageDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.uml.diagram.pkg.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="Package"/>
- </object>
- <context views="org.eclipse.papyrus.uml.diagram.pkg.Diagram"/>
- </editpartProvider>
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "3028" = COMMENT_CN
- "5063" = COMMENT_CN_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "3029" = CONSTRAINT_CN
- "5064" = CONSTRAINT_CN_LABEL_NAME_HINT
- "5160" = CONSTRAINT_CN_LABEL_BODY_HINT
- "2005" = MODEL
- "5020" = MODEL_LABEL_NAME_TN_HINT
- "7009" = MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3024" = MODEL_CN
- "5052" = MODEL_CN_LABEL_NAME_HINT
- "7030" = MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3028, 5063"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3029, 5064, 5160"/>
- </object>
- <object
- id="MODEL"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2005, 5020, 7009"/>
- </object>
- <object
- id="MODEL_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3024, 5052, 7030"/>
- </object>
-
-
- <!--
- "4008" = DEPENDENCY
- "6026" = DEPENDENCY_LABEL_NAME_HINT
- "6027" = DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4006" = ABSTRACTION
- "6014" = ABSTRACTION_LABEL_NAME_HINT
- "6015" = ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- -->
- <object
- id="DEPENDENCY"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4008, 6026, 6027"/>
- </object>
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="ABSTRACTION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4006, 6014, 6015"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
-
- <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN, MODEL, MODEL_CN"/>
- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, ABSTRACTION, CONSTRAINT_CONSTRAINED_ELEMENT"/>
-
- </editpartProvider>
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.pkg.provider.CustomEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- name="Package Diagram"
- category="org.eclipse.papyrus.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage"
- name="Model">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
- name="Dependency">
- </page>
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage"
- name="Abstraction">
- </page>
-
-
-
-
-
-</extension>
-
-<!-- // Start of user code custom extensions
- -->
-
-<!-- Insert custom extensions here. -->
-
-<!-- // End of user code
- -->
-
-</plugin> \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.xml
deleted file mode 100644
index c7d6758a721..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/plugin.xml
+++ /dev/null
@@ -1,688 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
-<!-- Diagram declaration -->
-<extension point="org.eclipse.papyrus.infra.core.papyrusDiagram">
- <creationCommand
- creationCommandClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand"
- creationCondition="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreationCondition"
- icon="icons/obj16/Diagram_Package.gif"
- id="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- language="uml"
- label="UML Package Diagram"/>
- <editorDiagram
- actionBarContributorId="org.eclipse.papyrus.uml.diagram.common.part.UMLDiagramActionBarContributor"
- factoryClass="org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramEditorFactory"
- icon="icons/obj16/Diagram_Package.gif" />
-</extension>
-
-<!-- Diagram creation command and handler -->
-<extension point="org.eclipse.ui.commands">
- <command id="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- name="Create a new Package Diagram"
- description="Create a new Package Diagram"
- categoryId="org.eclipse.papyrus.editor.category"/>
-</extension>
-
-<extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.pkg.CreatePackageDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
-</extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
- style="push" tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif" label="Create a new Package Diagram"
- style="push" tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.pkg.CreateCommand"
- icon="icons/obj16/Diagram_Package.gif"
- label="Create a new Package Diagram"
- style="push"
- tooltip="Create a new Package Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
-
- </command>
- </menuContribution>
-
-</extension>
-
-<!-- Palette tool declaration (declares the real palette containment) -->
-<extension point="org.eclipse.papyrus.uml.diagram.common.paletteDefinition"
- name="UML_Package">
-
- <paletteDefinition ID="UML_Package"
- class="org.eclipse.papyrus.uml.diagram.common.service.PluginPaletteProvider"
- name="UML_Package" icon="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- path="palettes/package.palette.xml"
- provider="CEA LIST">
- <Priority name="Low"/>
-
- <!-- Specify diagram this palette tools relate to -->
- <editor id="org.eclipse.papyrus.uml.diagram.pkg"/>
- </paletteDefinition>
-</extension>
-
-<!-- Diagram view providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
- <!-- Diagram view provider -->
- <viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.PackageDiagramViewProvider">
- <Priority name="Low"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Package"/>
- </viewProvider>
-
- <!-- ViewProvider for inherited elements (from ClassDiagram ViewProvider) -->
- <viewProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramViewProvider">
- <Priority name="Low"/>
-
- <!--
- "2007" = PACKAGE
- "3009" = PACKAGE_CN
- "2012" = COMMENT
- "3028" = COMMENT_CN
- "2011" = CONSTRAINT
- "3029" = CONSTRAINT_CN
- "2005" = MODEL
- "3024" = MODEL_CN
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2007, 3009, 2012, 3028, 2011, 3029, 2005, 3024"/>
-
- <!--
- "4008" = DEPENDENCY
- "4010" = PACKAGE_IMPORT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4006" = ABSTRACTION
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4008, 4010, 4013, 4006, 4014"/>
-
- <object id="elementtype.node"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="2007, 3009, 2012, 3028, 2011, 3029, 2005, 3024">
- </method>
- </object>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" elements="elementtype.node"/>
-
- <object id="elementtype.edge"
- class="org.eclipse.papyrus.gmf.diagram.common.commands.ISemanticHintAdapter(org.eclipse.papyrus.sysml.diagram.common)">
-
- <method
- name="getSemanticHint()"
- value="4008, 4010, 4013, 4006, 4014">
- </method>
- </object>
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge" elements="elementtype.edge"/>
-
-
- <!-- Additional descriptors provided in case the semantic hint is is not provided -->
-
- <!-- "uml.Package" -->
- <object id="uml.Package" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Package"/>
- </object>
-
- <!-- "uml.Comment" -->
- <object id="uml.Comment" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Comment"/>
- </object>
-
- <!-- "uml.Constraint" -->
- <object id="uml.Constraint" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Constraint"/>
- </object>
-
- <!-- "uml.Model" -->
- <object id="uml.Model" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Model"/>
- </object>
-
- <!-- "uml.Dependency" -->
- <object id="uml.Dependency" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Dependency"/>
- </object>
-
- <!-- "uml.PackageImport" -->
- <object id="uml.PackageImport" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.PackageImport"/>
- </object>
-
- <!-- "uml.Abstraction" -->
- <object id="uml.Abstraction" class="org.eclipse.gmf.runtime.emf.core.util.IProxyEObject(org.eclipse.gmf.runtime.emf.core)">
- <method name="getProxyClassID()" value="uml.Abstraction"/>
- </object>
-
- <!-- Additional activation contexts for nodes semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Node"
- elements="uml.Package, uml.Comment, uml.Constraint, uml.Model"/>
-
- <!-- Additional activation contexts for edges semantic objects -->
- <context viewClass="org.eclipse.gmf.runtime.notation.Edge"
- elements="uml.Dependency, uml.PackageImport, uml.Abstraction"/>
-
- </viewProvider>
-</extension>
-
-<!-- Diagram edit part providers declaration -->
-<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
-
- <!-- Diagram edit part provider -->
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.PackageDiagramEditPartProvider">
- <Priority name="Low"/>
- <object
- id="org.eclipse.papyrus.uml.diagram.pkg.Diagram"
- class="org.eclipse.gmf.runtime.notation.Diagram">
- <method name="getType()" value="Package"/>
- </object>
- <context views="org.eclipse.papyrus.uml.diagram.pkg.Diagram"/>
- </editpartProvider>
-
- <!-- EditPartProvider for inherited elements (from ClassDiagram) -->
- <editpartProvider class="org.eclipse.papyrus.uml.diagram.pkg.provider.InheritedClassDiagramEditPartProvider">
- <Priority name="Low"/>
- <!--
- The semantic hints given here are used in case the provider is not already loaded.
- As soon as the provider is loaded its provides method is used.
- "2007" = PACKAGE
- "5026" = PACKAGE_LABEL_NAME_HINT
- "7016" = PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3009" = PACKAGE_CN
- "5017" = PACKAGE_CN_LABEL_NAME_HINT
- "7010" = PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "2012" = COMMENT
- "5038" = COMMENT_LABEL_BODY_HINT
- "3028" = COMMENT_CN
- "5063" = COMMENT_CN_LABEL_BODY_HINT
- "2011" = CONSTRAINT
- "5037" = CONSTRAINT_LABEL_NAME_HINT
- "5159" = CONSTRAINT_LABEL_BODY_HINT
- "3029" = CONSTRAINT_CN
- "5064" = CONSTRAINT_CN_LABEL_NAME_HINT
- "5160" = CONSTRAINT_CN_LABEL_BODY_HINT
- "2005" = MODEL
- "5020" = MODEL_LABEL_NAME_TN_HINT
- "7009" = MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- "3024" = MODEL_CN
- "5052" = MODEL_CN_LABEL_NAME_HINT
- "7030" = MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT
- -->
- <object
- id="PACKAGE"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2007, 5026, 7016"/>
- </object>
- <object
- id="PACKAGE_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3009, 5017, 7010"/>
- </object>
- <object
- id="COMMENT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2012, 5038"/>
- </object>
- <object
- id="COMMENT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3028, 5063"/>
- </object>
- <object
- id="CONSTRAINT"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2011, 5037, 5159"/>
- </object>
- <object
- id="CONSTRAINT_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3029, 5064, 5160"/>
- </object>
- <object
- id="MODEL"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="2005, 5020, 7009"/>
- </object>
- <object
- id="MODEL_CN"
- class="org.eclipse.gmf.runtime.notation.Node">
- <method name="getType()" value="3024, 5052, 7030"/>
- </object>
-
-
- <!--
- "4008" = DEPENDENCY
- "6026" = DEPENDENCY_LABEL_NAME_HINT
- "6027" = DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT
- "4010" = PACKAGE_IMPORT
- "6022" = PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT
- "4013" = COMMENT_ANNOTATED_ELEMENT
- "4006" = ABSTRACTION
- "6014" = ABSTRACTION_LABEL_NAME_HINT
- "6015" = ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT
- "4014" = CONSTRAINT_CONSTRAINED_ELEMENT
- -->
- <object
- id="DEPENDENCY"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4008, 6026, 6027"/>
- </object>
- <object
- id="PACKAGE_IMPORT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4010, 6022"/>
- </object>
- <object
- id="COMMENT_ANNOTATED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4013"/>
- </object>
- <object
- id="ABSTRACTION"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4006, 6014, 6015"/>
- </object>
- <object
- id="CONSTRAINT_CONSTRAINED_ELEMENT"
- class="org.eclipse.gmf.runtime.notation.Edge">
- <method name="getType()" value="4014"/>
- </object>
-
- <context views="PACKAGE, PACKAGE_CN, COMMENT, COMMENT_CN, CONSTRAINT, CONSTRAINT_CN, MODEL, MODEL_CN"/>
- <context views="DEPENDENCY, PACKAGE_IMPORT, COMMENT_ANNOTATED_ELEMENT, ABSTRACTION, CONSTRAINT_CONSTRAINED_ELEMENT"/>
-
- </editpartProvider>
-</extension>
-
-<!-- Diagram edit policy provider -->
-<extension
- point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
- <editpolicyProvider
- class="org.eclipse.papyrus.uml.diagram.pkg.provider.CustomEditPolicyProvider">
- <Priority name="Low"/>
- </editpolicyProvider>
-</extension>
-
-<!-- Preference pages declaration -->
-<extension point="org.eclipse.ui.preferencePages" id="prefpages">
-
- <!-- Diagram Preference pages declaration -->
- <page
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- name="Package Diagram"
- category="org.eclipse.papyrus.infra.gmfdiag.preferences.diagrams"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageDiagramGeneralPreferencePage">
- </page>
-
- <!-- Element Preference pages declaration -->
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage"
- name="Package">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage"
- name="Comment">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage"
- name="Constraint">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage"
- name="Model">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage"
- name="Dependency">
- </page>
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage"
- name="PackageImport">
- </page>
-
-
-
-
- <page category="org.eclipse.papyrus.uml.diagram.pkg.preferences"
- class="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage"
- id="org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage"
- name="Abstraction">
- </page>
-
-
-
-
-
-</extension>
-
-<!-- // Start of user code custom extensions
- -->
-
-<!-- Insert custom extensions here. -->
-
- <extension
- id="ep-provider"
- point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
- <editpartProvider
- class="org.eclipse.papyrus.uml.diagram.pkg.provider.CPackageEditPartProvider">
- <Priority
- name="High">
- </Priority>
- <object
- class="org.eclipse.gmf.runtime.notation.Diagram"
- id="generated-diagram">
- <method
- name="getType()"
- value="Package">
- </method>
- </object>
- <object
- class="org.eclipse.gmf.runtime.notation.Node"
- id="generated-nodes">
- <method
- name="getType()"
- value="2014,2013,2015,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2016,3002,3003,3004,3015,3031,3016,3005,3006,3007,3008,3020,3021,3022,3023,3024,3025,3017,3009,3010,3011,3012,3013,3014,3026,3027,3018,3019,3028,3029,3030">
- </method>
- </object>
- <object
- class="org.eclipse.gmf.runtime.notation.Edge"
- id="generated-links">
- <method
- name="getType()"
- value="4016,4017,4001,4019,4002,4003,4004,4005,4006,4007,4008,4018,4009,4010,4011,4012,4013,4014,4015,4020,4021">
- </method>
- </object>
- <object
- class="org.eclipse.gmf.runtime.notation.Node"
- id="generated-labels">
- <method
- name="getType()"
- value="5066,5002,5005,5008,5011,5020,5023,5026,5029,5032,5035,5037,5038,0,5040,5043,5046,5049,5052,5055,5017,5014,5058,5061,5063,5064">
- </method>
- </object>
- <object
- class="org.eclipse.gmf.runtime.notation.Node"
- id="generated-compartments">
- <method
- name="getType()"
- value="7034,7001,7002,7003,7004,7014,7005,7006,7007,7008,7009,7023,7024,7025,7026,7027,7028,7029,7030,7031,7010,7011,7012,7013,7032,7033,7015,7016,7017,7018,7019,7020,7021,7035">
- </method>
- </object>
- <object
- id="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments">
- </object>
- </editpartProvider>
-</extension>
-
-<!-- // End of user code
- -->
-<extension point="org.eclipse.papyrus.infra.gmfdiag.common.notationTypesMapping">
- <diagramMappings diagramID="Package">
- <mapping type="Package" humanReadableType="PackageDiagram"/>
- <!-- Compartments -->
- <mapping
- humanReadableType="attributes"
- type="7011">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7012">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7013">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7023">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7024">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7025">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7026">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7027">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7028">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7029">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7041">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7042">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7032">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7033">
- </mapping>
-
- <mapping
- humanReadableType="packaged elements"
- type="7030">
- </mapping>
-
- <mapping
- humanReadableType="packaged elements"
- type="7010">
- </mapping>
-
- <mapping
- humanReadableType="literals"
- type="7031">
- </mapping>
-
- <mapping
- humanReadableType="slots"
- type="7035">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7017">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7018">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7019">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7002">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7003">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7004">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7006">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7007">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7008">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7039">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7040">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7020">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7021">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7034">
- </mapping>
-
- <mapping
- humanReadableType="slots"
- type="7001">
- </mapping>
-
- <mapping
- humanReadableType="attributes"
- type="7005">
- </mapping>
-
- <mapping
- humanReadableType="packaged elements"
- type="7009">
- </mapping>
-
- <mapping
- humanReadableType="packaged elements"
- type="7016">
- </mapping>
-
- <mapping
- humanReadableType="literals"
- type="7015">
- </mapping>
-
- <mapping
- humanReadableType="operations"
- type="7036">
- </mapping>
-
- <mapping
- humanReadableType="nested classifiers"
- type="7037">
- </mapping>
-
- <mapping
- humanReadableType="TemplateParameter"
- type="7014">
- </mapping>
-
- <mapping
- humanReadableType="TemplateParameter"
- type="7038">
- </mapping>
- <!-- Link labels -->
- </diagramMappings>
-</extension>
-</plugin> \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/Activator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/Activator.java
deleted file mode 100644
index 210fa8227af..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/Activator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageDiagramPreferenceInitializer;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends AbstractUIPlugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.pkg";
-
- /** The plug-in shared instance */
- private static Activator plugin;
-
- /** The logging helper */
- public static LogHelper log;
-
- /** The plug-in Preference store */
- public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(PLUGIN_ID);
-
- /** Default constructor */
- public Activator() {
- }
-
- /*
- * (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;
-
- // register the login helper
- log = new LogHelper(plugin);
-
- // register the preference store
- PreferencesHint.registerPreferenceStore(DIAGRAM_PREFERENCES_HINT, getPreferenceStore());
-
- // Preferences initialization
- PackageDiagramPreferenceInitializer diagramPreferenceInitializer = new PackageDiagramPreferenceInitializer();
- diagramPreferenceInitializer.initializeDefaultPreferences();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext context) throws Exception {
-
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getInstance() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @generated
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getBundledImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- *
- * @return Shared Preference Store.
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- IPreferenceStore store = org.eclipse.papyrus.infra.gmfdiag.preferences.Activator.getDefault().getPreferenceStore();
- return store;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreateCommand.java
deleted file mode 100644
index f74b8c2a58e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreateCommand.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class PackageDiagramCreateCommand extends AbstractPapyrusGmfCreateDiagramCommandHandler {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDefaultDiagramName() {
- return "PackageDiagram"; // //$NON-NLS-1$
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getDiagramNotationID() {
- return ElementTypes.DIAGRAM_ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected PreferencesHint getPreferenceHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Diagram createDiagram(Resource diagramResource, EObject owner, String name) {
- // Start of user code Custom diagram creation
- Diagram diagram = null;
-
- if(owner instanceof org.eclipse.uml2.uml.Package) {
- diagram = super.createDiagram(diagramResource, owner, name);
- }
-
- return diagram;
- // End of user code
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramEditorFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramEditorFactory.java
deleted file mode 100644
index dca02fba5f5..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramEditorFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfEditorFactory;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class PackageDiagramEditorFactory extends GmfEditorFactory {
-
- public PackageDiagramEditorFactory() {
- super(PackageDiagramForMultiEditor.class, ElementTypes.DIAGRAM_ID);
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramForMultiEditor.java
deleted file mode 100644
index 30e0cf68d9a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramForMultiEditor.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.uml.diagram.pkg.part.PackageDiagramEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-
-/**
- * An editor to be used in multitabs editor. This editor extends the original UML Diagram.
- *
- */
-public class PackageDiagramForMultiEditor extends PackageDiagramEditor {
-
- /**
- * The location of diagram icon in the plug-in
- */
- private static final String DIAG_IMG_PATH = "icons/obj16/Diagram_Package.gif";
-
- /**
- * The image descriptor of the diagram icon
- */
- private static final ImageDescriptor DIAG_IMG_DESC = Activator.getBundledImageDescriptor(PackageDiagramForMultiEditor.DIAG_IMG_PATH);
-
- /** The editor splitter. */
- private Composite splitter;
-
- /**
- * Constructor for SashSystem v2. Context and required objects are retrieved from the
- * ServiceRegistry.
- *
- * @throws BackboneException
- * @throws ServiceException
- *
- */
- public PackageDiagramForMultiEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws BackboneException, ServiceException {
- super(servicesRegistry, diagram);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
- super.init(site, input);
- setPartName(getDiagram().getName());
- setTitleImage(DIAG_IMG_DESC.createImage());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setInput(IEditorInput input) {
- try {
- // Provide an URI with fragment in order to reuse the same Resource
- // and set the diagram to the fragment.
- URIEditorInput uriInput = new URIEditorInput(EcoreUtil.getURI(getDiagram()));
- doSetInput(uriInput, true);
- } catch (CoreException x) {
- String title = "Problem opening";
- String msg = "Cannot open input element:";
- Shell shell = getSite().getShell();
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createGraphicalViewer(Composite parent) {
- splitter = parent;
- super.createGraphicalViewer(parent);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setFocus() {
- splitter.setFocus();
- super.setFocus();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditingDomainID() {
- return "org.eclipse.papyrus.uml.diagram.pkg.EditingDomain";
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/part/PackageDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/part/PackageDiagramEditPart.java
deleted file mode 100644
index ea133b10904..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/part/PackageDiagramEditPart.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.edit.part;
-
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.RemoveOrphanViewPolicy;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.policies.ModelItemSemanticEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
-import org.eclipse.papyrus.uml.diagram.pkg.edit.policy.CustomDragDropEditPolicy;
-
-public class PackageDiagramEditPart extends DiagramEditPart {
-
- public PackageDiagramEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
- installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ModelItemSemanticEditPolicy());
- installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy());
- installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/PackageDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/PackageDiagramDragDropEditPolicy.java
deleted file mode 100644
index 4f9e6412103..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/PackageDiagramDragDropEditPolicy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.edit.policy;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.GraphicalTypeRegistry;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.IGraphicalTypeRegistry;
-
-/** Customization of the DND edit policy for the Package Diagram */
-public class PackageDiagramDragDropEditPolicy extends ClassDiagramDragDropEditPolicy {
-
- /** Local graphical type registry */
- protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getNodeVisualID(View containerView, EObject domainElement) {
- String domainType = registry.getNodeGraphicalType(domainElement, containerView.getType());
- if(IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
- return -1; // undefined
- }
- return new Integer(domainType);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public int getLinkWithClassVisualID(EObject domainElement) {
- String domainType = registry.getEdgeGraphicalType(domainElement);
- if(IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainType)) {
- return -1; // undefined
- }
- return new Integer(domainType);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/factory/PackageDiagramViewFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/factory/PackageDiagramViewFactory.java
deleted file mode 100644
index cd8f8e74cd7..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/factory/PackageDiagramViewFactory.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.factory;
-
-import org.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory;
-import org.eclipse.gmf.runtime.notation.MeasurementUnit;
-
-public class PackageDiagramViewFactory extends DiagramViewFactory {
-
- protected MeasurementUnit getMeasurementUnit() {
- return MeasurementUnit.PIXEL_LITERAL;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/part/PackageDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/part/PackageDiagramEditor.java
deleted file mode 100644
index adfa5c3cffd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/part/PackageDiagramEditor.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.part;
-
-import java.util.EventObject;
-import java.util.Set;
-
-import org.eclipse.core.commands.operations.IUndoableOperation;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.KeyHandler;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.CommandStackListener;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.ui.palette.PaletteViewer;
-import org.eclipse.gef.ui.palette.PaletteViewerProvider;
-import org.eclipse.gmf.runtime.common.core.service.IProviderChangeListener;
-import org.eclipse.gmf.runtime.common.core.service.ProviderChangeEvent;
-import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.ui.actions.ActionIds;
-import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
-import org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider;
-import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocumentProvider;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.GmfMultiDiagramDocumentProvider;
-import org.eclipse.papyrus.uml.diagram.common.listeners.DropTargetListener;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteContextMenuProvider;
-import org.eclipse.papyrus.uml.diagram.common.part.PapyrusPaletteViewer;
-import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
-import org.eclipse.papyrus.uml.diagram.common.service.PapyrusPaletteService;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.ide.IGotoMarker;
-import org.eclipse.ui.part.ShowInContext;
-
-/**
- * @generated
- */
-public class PackageDiagramEditor extends UmlGmfDiagramEditor implements IProviderChangeListener, IGotoMarker {
-
- /**
- * @generated
- */
- public static final String ID = "org.eclipse.papyrus.uml.diagram.pkg.part.PackageDiagramEditorID"; //$NON-NLS-1$
-
- /**
- * @generated
- */
- private KeyHandler paletteKeyHandler = null;
-
- /**
- * @generated
- */
- private MouseListener paletteMouseListener = null;
-
- /**
- * @generated
- */
- private IUndoableOperation savedOperation = null;
-
- /**
- * @generated
- */
- private TransactionalEditingDomain editingDomain;
-
- /**
- * @generated
- */
- private IDocumentProvider documentProvider;
-
- /**
- * @generated
- */
- public PackageDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
- super(servicesRegistry, diagram);
-
- // adds a listener to the palette service, which reacts to palette customizations
- PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
- // Share the same editing provider
- editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
- documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
- // overrides editing domain created by super constructor
- setDocumentProvider(documentProvider);
- }
-
- /**
- * @generated
- */
- protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {
- PaletteRoot paletteRoot;
- if(existingPaletteRoot == null) {
- paletteRoot = PapyrusPaletteService.getInstance().createPalette(this, getDefaultPaletteContent());
- } else {
- PapyrusPaletteService.getInstance().updatePalette(existingPaletteRoot, this, getDefaultPaletteContent());
- paletteRoot = existingPaletteRoot;
- }
- applyCustomizationsToPalette(paletteRoot);
- return paletteRoot;
- }
-
- /**
- * @generated
- */
- protected PreferencesHint getPreferencesHint() {
- return Activator.DIAGRAM_PREFERENCES_HINT;
- }
-
- /**
- * @generated
- */
- public String getContributorId() {
- return Activator.PLUGIN_ID;
- }
-
- /**
- * @generated
- */
- protected final IDocumentProvider getDocumentProvider(IEditorInput input) {
- return documentProvider;
- }
-
- /**
- * @generated
- */
- public TransactionalEditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected final void setDocumentProvider(IEditorInput input) {
- // Already set in the constructor
- }
-
- /**
- * @generated
- */
- public void gotoMarker(IMarker marker) {
- MarkerNavigationService.getInstance().gotoMarker(this, marker);
- }
-
- /**
- * @generated
- */
- public boolean isSaveAsAllowed() {
- return true;
- }
-
- /**
- * @generated
- */
- public void doSaveAs() {
- performSaveAs(new NullProgressMonitor());
- }
-
- /**
- * @generated
- */
- protected void performSaveAs(IProgressMonitor progressMonitor) {
- // Nothing
- }
-
- /**
- * @generated
- */
- public ShowInContext getShowInContext() {
- return new ShowInContext(getEditorInput(), getGraphicalViewer().getSelection());
- }
-
- /**
- * @generated
- */
- protected void configureGraphicalViewer() {
- super.configureGraphicalViewer();
-
- // Replace diagram contextual menu removing default
- // delete from model action.
- DiagramContextMenuProvider provider = (DiagramContextMenuProvider)getDiagramGraphicalViewer().getContextMenu();
- Set<String> menuExclusions = provider.getExclusionSet();
- menuExclusions.add(ActionIds.ACTION_DELETE_FROM_MODEL);
- provider.setExclusionSet(menuExclusions);
- }
-
- /**
- * @generated
- */
- protected TransactionalEditingDomain createEditingDomain() {
- // Already configured
- return editingDomain;
- }
-
- /**
- * @generated
- */
- protected void configureDiagramEditDomain() {
- super.configureDiagramEditDomain();
- getDiagramEditDomain().getDiagramCommandStack().addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- firePropertyChange(IEditorPart.PROP_DIRTY);
- }
- });
- }
-
- /**
- * @generated
- */
- public void doSave(IProgressMonitor progressMonitor) {
- // The saving of the resource is done by the CoreMultiDiagramEditor
- savedOperation = getOperationHistory().getUndoOperation(getUndoContext());
- }
-
- /**
- * @generated
- */
- public boolean isDirty() {
- IUndoableOperation op = getOperationHistory().getUndoOperation(getUndoContext());
- return savedOperation != op;
- }
-
- /**
- * @generated
- */
- public void providerChanged(ProviderChangeEvent event) {
- // update the palette if the palette service has changed
- if(PapyrusPaletteService.getInstance().equals(event.getSource())) {
- PapyrusPaletteService.getInstance().updatePalette(getPaletteViewer().getPaletteRoot(), this, getDefaultPaletteContent());
- }
- }
-
- /**
- * @generated
- */
- public void dispose() {
- // remove palette service listener
- // remove preference listener
- PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
- super.dispose();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer getPaletteViewer() {
- return getEditDomain().getPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewer constructPaletteViewer() {
- return new PapyrusPaletteViewer();
- }
-
- /**
- * @generated
- */
- protected PaletteViewerProvider createPaletteViewerProvider() {
- getEditDomain().setPaletteRoot(createPaletteRoot(null));
- return new PaletteViewerProvider(getEditDomain()) {
-
- /**
- * Override to provide the additional behavior for the tools. Will intialize with a
- * PaletteEditPartFactory that has a TrackDragger that understand how to handle the
- * mouseDoubleClick event for shape creation tools. Also will initialize the palette
- * with a defaultTool that is the SelectToolEx that undestands how to handle the enter
- * key which will result in the creation of the shape also.
- */
- protected void configurePaletteViewer(PaletteViewer viewer) {
- super.configurePaletteViewer(viewer);
-
- // customize menu...
- viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
- viewer.getKeyHandler().setParent(getPaletteKeyHandler());
- viewer.getControl().addMouseListener(getPaletteMouseListener());
-
- // Add a transfer drag target listener that is supported on
- // palette template entries whose template is a creation tool.
- // This will enable drag and drop of the palette shape creation
- // tools.
- viewer.addDragSourceListener(new PaletteToolTransferDragSourceListener(viewer));
- viewer.setCustomizer(createPaletteCustomizer());
- }
-
- public PaletteViewer createPaletteViewer(Composite parent) {
- PaletteViewer pViewer = constructPaletteViewer();
- pViewer.createControl(parent);
- configurePaletteViewer(pViewer);
- hookPaletteViewer(pViewer);
- return pViewer;
- }
-
- /**
- * @return Palette Key Handler for the palette
- */
- private KeyHandler getPaletteKeyHandler() {
-
- if(paletteKeyHandler == null) {
-
- paletteKeyHandler = new KeyHandler() {
-
- /**
- * Processes a <i>key released </i> event. This method is called by the Tool
- * whenever a key is released, and the Tool is in the proper state. Override
- * to support pressing the enter key to create a shape or connection
- * (between two selected shapes)
- *
- * @param event
- * the KeyEvent
- * @return <code>true</code> if KeyEvent was handled in some way
- */
- public boolean keyReleased(KeyEvent event) {
-
- if(event.keyCode == SWT.Selection) {
-
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.keyUp(event, getDiagramGraphicalViewer());
-
- // deactivate current selection
- getPaletteViewer().setActiveTool(null);
-
- return true;
- }
-
- }
- return super.keyReleased(event);
- }
-
- };
-
- }
- return paletteKeyHandler;
- }
-
- /**
- * @return Palette Mouse listener for the palette
- */
- private MouseListener getPaletteMouseListener() {
-
- if(paletteMouseListener == null) {
-
- paletteMouseListener = new MouseListener() {
-
- /**
- * Flag to indicate that the current active tool should be cleared after a
- * mouse double-click event.
- */
- private boolean clearActiveTool = false;
-
- /**
- * Override to support double-clicking a palette tool entry to create a
- * shape or connection (between two selected shapes).
- *
- * @see MouseListener#mouseDoubleClick(MouseEvent)
- */
- public void mouseDoubleClick(MouseEvent e) {
- Tool tool = getPaletteViewer().getActiveTool().createTool();
-
- if(toolSupportsAccessibility(tool)) {
-
- tool.setViewer(getDiagramGraphicalViewer());
- tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
- tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
- // Current active tool should be deactivated,
- // but if it is down here it will get
- // reactivated deep in GEF palette code after
- // receiving mouse up events.
- clearActiveTool = true;
- }
- }
-
- public void mouseDown(MouseEvent e) {
- // do nothing
- }
-
- public void mouseUp(MouseEvent e) {
- // Deactivate current active tool here if a
- // double-click was handled.
- if(clearActiveTool) {
- getPaletteViewer().setActiveTool(null);
- clearActiveTool = false;
- }
-
- }
- };
-
- }
- return paletteMouseListener;
- }
-
- };
- }
-
- /**
- * @generated
- */
- @Override
- public GraphicalViewer getGraphicalViewer() {
- return super.getGraphicalViewer();
- }
-
- /**
- * @generated
- */
- @Override
- protected void initializeGraphicalViewer() {
- super.initializeGraphicalViewer();
-
- // Enable Drop
- getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
-
- @Override
- protected Object getJavaObject(TransferData data) {
- return LocalSelectionTransfer.getTransfer().nativeToJava(data);
- }
-
- @Override
- protected TransactionalEditingDomain getTransactionalEditingDomain() {
- return getEditingDomain();
- }
- });
-
- }
-
- /**
- * @generated
- */
- @Override
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if(getSite().getPage().getActiveEditor() instanceof IMultiDiagramEditor) {
- IMultiDiagramEditor editor = (IMultiDiagramEditor)getSite().getPage().getActiveEditor();
- // If not the active editor, ignore selection changed.
- if(this.equals(editor.getActiveEditor())) {
- updateActions(getSelectionActions());
- super.selectionChanged(part, selection);
- } else {
- super.selectionChanged(part, selection);
- }
- } else {
- super.selectionChanged(part, selection);
- }
- // from
- // org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.selectionChanged(IWorkbenchPart,
- // ISelection)
- if(part == this) {
- rebuildStatusLine();
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java
deleted file mode 100644
index d77d4b0be61..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/AbstractionPreferencePage.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class AbstractionPreferencePage extends PackageDiagramLinkPreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Abstraction"; //$NON-NLS-1$
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> labelDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- labelDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- labelDefaultVisibilityMap.put("Name", Boolean.TRUE); //$NON-NLS-1$
- labelDefaultVisibilityMap.put("Stereotype", Boolean.TRUE); //$NON-NLS-1$
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(labelDefaultVisibilityMap);
- }
-
- /** Default constructor */
- public AbstractionPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Abstraction"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- for(String labelName : labelDefaultVisibilityMap.keySet()) {
- String showLabelKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, labelName, PreferencesConstantsHelper.LABEL_VISIBILITY);
- store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeLabelsList() {
- for(String name : labelDefaultVisibilityMap.keySet()) {
- this.labelsList.add(name);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentLinkPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentLinkPreferencePage.java
deleted file mode 100644
index 883bfd70c17..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentLinkPreferencePage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class CommentLinkPreferencePage extends PackageDiagramLinkPreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"; //$NON-NLS-1$
-
- /** Default constructor */
- public CommentLinkPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_CommentAnnotatedElement"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentPreferencePage.java
deleted file mode 100644
index 8fc02ecbfcf..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/CommentPreferencePage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class CommentPreferencePage extends PackageDiagramNodePreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Comment"; //$NON-NLS-1$
-
- /** Default constructor */
- public CommentPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Comment"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java
deleted file mode 100644
index f6e44eaa183..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintConstrainedElementPreferencePage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class ConstraintConstrainedElementPreferencePage extends PackageDiagramLinkPreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"; //$NON-NLS-1$
-
- /** Default constructor */
- public ConstraintConstrainedElementPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_ConstraintConstrainedElement"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java
deleted file mode 100644
index 7bc5e245b38..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ConstraintPreferencePage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class ConstraintPreferencePage extends PackageDiagramNodePreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Constraint"; //$NON-NLS-1$
-
- /** Default constructor */
- public ConstraintPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Constraint"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/DependencyPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/DependencyPreferencePage.java
deleted file mode 100644
index bf34433f72e..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/DependencyPreferencePage.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class DependencyPreferencePage extends PackageDiagramLinkPreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_DependencyLink"; //$NON-NLS-1$
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> labelDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- labelDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- labelDefaultVisibilityMap.put("Name", Boolean.TRUE); //$NON-NLS-1$
- labelDefaultVisibilityMap.put("Stereotype", Boolean.TRUE); //$NON-NLS-1$
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(labelDefaultVisibilityMap);
- }
-
- /** Default constructor */
- public DependencyPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_DependencyLink"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- for(String labelName : labelDefaultVisibilityMap.keySet()) {
- String showLabelKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, labelName, PreferencesConstantsHelper.LABEL_VISIBILITY);
- store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeLabelsList() {
- for(String name : labelDefaultVisibilityMap.keySet()) {
- this.labelsList.add(name);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java
deleted file mode 100644
index e5684450c39..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/ModelPreferencePage.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class ModelPreferencePage extends PackageDiagramNodePreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Model"; //$NON-NLS-1$
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
-
- /** The compartment titles default visibility for preferences */
- public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentDefaultVisibilityMap.put("packaged elements", Boolean.TRUE); //$NON-NLS-1$
-
- compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentTitleDefaultVisibilityMap.put("packaged elements", Boolean.TRUE); //$NON-NLS-1$
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
- Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
- }
-
- /** Default constructor */
- public ModelPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Model"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentNamesList() {
- for(String name : compartmentDefaultVisibilityMap.keySet()) {
- this.compartmentNamesList.add(name);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentTitlesList() {
- for(String name : compartmentTitleDefaultVisibilityMap.keySet()) {
- this.compartmentTitlesList.add(name);
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramGeneralPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramGeneralPreferencePage.java
deleted file mode 100644
index 386452fee6a..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramGeneralPreferencePage.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.DiagramPreferencePage;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class PackageDiagramGeneralPreferencePage extends DiagramPreferencePage {
-
- public PackageDiagramGeneralPreferencePage() {
- setPreferenceStore(Activator.getInstance().getPreferenceStore());
- setPreferenceKey(ElementTypes.DIAGRAM_ID);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramLinkPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramLinkPreferencePage.java
deleted file mode 100644
index 25dda03ef50..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramLinkPreferencePage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.TreeMap;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusLinkPreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.swt.widgets.Composite;
-
-public class PackageDiagramLinkPreferencePage extends AbstractPapyrusLinkPreferencePage {
-
- /** The list of label names for this link */
- protected List<String> labelsList;
-
- /** Constructor */
- public PackageDiagramLinkPreferencePage() {
- labelsList = new ArrayList<String>();
- initializeLabelsList();
- Collections.unmodifiableList(labelsList);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // Add label visibility group
- if(!labelsList.isEmpty()) {
- OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
- addAbstractGroup(compartmentGroup);
- }
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-
- /** Initialize the list containing names of labels. */
- protected void initializeLabelsList() {
- // Implemented by subclasses.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, String> getLabelRole() {
- return new TreeMap<String, String>();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramNodePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramNodePreferencePage.java
deleted file mode 100644
index ce450bade06..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramNodePreferencePage.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.TreeMap;
-
-import org.eclipse.papyrus.infra.gmfdiag.preferences.pages.AbstractPapyrusNodePreferencePage;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedCompartmentGroup;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.ui.OrderedLabelGroup;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.swt.widgets.Composite;
-
-public class PackageDiagramNodePreferencePage extends AbstractPapyrusNodePreferencePage {
-
- /** The list owning the names of compartments */
- protected List<String> compartmentNamesList;
-
- /** The list owning the names of compartment that have a title */
- protected List<String> compartmentTitlesList;
-
- /** The list of label names for this node */
- protected List<String> labelsList;
-
- /** Constructor */
- public PackageDiagramNodePreferencePage() {
- this.labelsList = new ArrayList<String>();
- this.compartmentNamesList = new ArrayList<String>();
- this.compartmentTitlesList = new ArrayList<String>();
-
- initializeLabelsList();
- initializeCompartmentNamesList();
- initializeCompartmentTitlesList();
-
- Collections.unmodifiableList(labelsList);
- Collections.unmodifiableList(compartmentNamesList);
- Collections.unmodifiableList(compartmentTitlesList);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void createPageContents(Composite parent) {
- super.createPageContents(parent);
-
- // Add compartments visibility group
- if(!compartmentNamesList.isEmpty()) {
- OrderedCompartmentGroup compartmentGroup = new OrderedCompartmentGroup(parent, getPreferenceKey(), this, compartmentNamesList, compartmentTitlesList, getPreferenceStore());
- addAbstractGroup(compartmentGroup);
- }
-
- // Add label visibility group
- if(!labelsList.isEmpty()) {
- OrderedLabelGroup compartmentGroup = new OrderedLabelGroup(parent, getPreferenceKey(), this, labelsList);
- addAbstractGroup(compartmentGroup);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getBundleId() {
- return Activator.PLUGIN_ID;
- }
-
- /** Initialize the list containing names of labels. */
- protected void initializeLabelsList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartments. */
- protected void initializeCompartmentNamesList() {
- // Implemented by subclasses.
- }
-
- /** Initialize the list containing the names of compartment that have titles. */
- protected void initializeCompartmentTitlesList() {
- // Implemented by subclasses.
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, String> getLabelRole() {
- return new TreeMap<String, String>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final TreeMap<String, Boolean> getCompartmentTitleVisibilityPreferences() {
- return new TreeMap<String, Boolean>();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected final void initializeCompartmentsList() {
- compartmentsList = Collections.emptyList();
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java
deleted file mode 100644
index 02ad2ce4c34..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageDiagramPreferenceInitializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-
-public class PackageDiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- protected IPreferenceStore getPreferenceStore() {
- return Activator.getInstance().getPreferenceStore();
- }
-
- @Override
- public void initializeDefaultPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.preferences.CommentPreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.preferences.ConstraintPreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.CustomModelPreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.preferences.DependencyPreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.preferences.PackageImportPreferencePage.initDefaults(store);
- org.eclipse.papyrus.uml.diagram.pkg.preferences.AbstractionPreferencePage.initDefaults(store);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageImportPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageImportPreferencePage.java
deleted file mode 100644
index ba5011319d9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackageImportPreferencePage.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class PackageImportPreferencePage extends PackageDiagramLinkPreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_PackageImport"; //$NON-NLS-1$
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> labelDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- labelDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- labelDefaultVisibilityMap.put("Stereotype", Boolean.TRUE); //$NON-NLS-1$
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(labelDefaultVisibilityMap);
- }
-
- /** Default constructor */
- public PackageImportPreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_PackageImport"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- for(String labelName : labelDefaultVisibilityMap.keySet()) {
- String showLabelKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, labelName, PreferencesConstantsHelper.LABEL_VISIBILITY);
- store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeLabelsList() {
- for(String name : labelDefaultVisibilityMap.keySet()) {
- this.labelsList.add(name);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackagePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackagePreferencePage.java
deleted file mode 100644
index b765504af9f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/preferences/PackagePreferencePage.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.preferences;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-
-public class PackagePreferencePage extends PackageDiagramNodePreferencePage {
-
- /** Constant key to access preferences */
- protected static String prefKey = ElementTypes.DIAGRAM_ID + "_Package"; //$NON-NLS-1$
-
- /** The compartments default visibility for preferences */
- public static final Map<String, Boolean> compartmentDefaultVisibilityMap;
-
- /** The compartment titles default visibility for preferences */
- public static final Map<String, Boolean> compartmentTitleDefaultVisibilityMap;
-
- /** Static attribute initialization */
- static {
- compartmentDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentDefaultVisibilityMap.put("packaged elements", Boolean.TRUE); //$NON-NLS-1$
-
- compartmentTitleDefaultVisibilityMap = new LinkedHashMap<String, Boolean>();
- compartmentTitleDefaultVisibilityMap.put("packaged elements", Boolean.TRUE); //$NON-NLS-1$
-
- // Start of user code custom static initializations
- // End of user code
-
- Collections.unmodifiableMap(compartmentDefaultVisibilityMap);
- Collections.unmodifiableMap(compartmentTitleDefaultVisibilityMap);
- }
-
- /** Default constructor */
- public PackagePreferencePage() {
- super();
- setPreferenceKey(ElementTypes.DIAGRAM_ID + "_Package"); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentNamesList() {
- for(String name : compartmentDefaultVisibilityMap.keySet()) {
- this.compartmentNamesList.add(name);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void initializeCompartmentTitlesList() {
- for(String name : compartmentTitleDefaultVisibilityMap.keySet()) {
- this.compartmentTitlesList.add(name);
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java
deleted file mode 100644
index d3880f2d50d..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/ElementTypes.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-public class ElementTypes extends AbstractElementTypeEnumerator {
-
- /** ********************************************************* */
- /** UML Package Diagram specific elements **************** */
- /** ********************************************************* */
-
- /** UML Package Diagram :: Diagram */
- public static final String DIAGRAM_ID = "Package"; //$NON-NLS-1$
-
- /** ********************************************************* */
- /** UML Package Diagram - ClassDiagram related elements */
- /** ********************************************************* */
-
- /** ClassDiagram :: PACKAGE */
- public static final IHintedType PACKAGE = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_2007"); //$NON-NLS-1$
-
- public static final String PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7016"; //$NON-NLS-1$
-
- public static final String PACKAGE_LABEL_NAME_HINT = "5026"; //$NON-NLS-1$
-
- /** ClassDiagram :: PACKAGE_CN */
- public static final IHintedType PACKAGE_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Package_3009"); //$NON-NLS-1$
-
- public static final String PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7010"; //$NON-NLS-1$
-
- public static final String PACKAGE_CN_LABEL_NAME_HINT = "5017"; //$NON-NLS-1$
-
- /** ClassDiagram :: COMMENT */
- public static final IHintedType COMMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Comment_2012"); //$NON-NLS-1$
-
- public static final String COMMENT_LABEL_BODY_HINT = "5038"; //$NON-NLS-1$
-
- /** ClassDiagram :: COMMENT_CN */
- public static final IHintedType COMMENT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Comment_3028"); //$NON-NLS-1$
-
- public static final String COMMENT_CN_LABEL_BODY_HINT = "5063"; //$NON-NLS-1$
-
- /** ClassDiagram :: CONSTRAINT */
- public static final IHintedType CONSTRAINT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_NAME_HINT = "5037"; //$NON-NLS-1$
-
- public static final String CONSTRAINT_LABEL_BODY_HINT = "5159"; //$NON-NLS-1$
-
- /** ClassDiagram :: CONSTRAINT_CN */
- public static final IHintedType CONSTRAINT_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"); //$NON-NLS-1$
-
- public static final String CONSTRAINT_CN_LABEL_NAME_HINT = "5064"; //$NON-NLS-1$
-
- public static final String CONSTRAINT_CN_LABEL_BODY_HINT = "5160"; //$NON-NLS-1$
-
- /** ClassDiagram :: MODEL */
- public static final IHintedType MODEL = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Model_2005"); //$NON-NLS-1$
-
- public static final String MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7009"; //$NON-NLS-1$
-
- public static final String MODEL_LABEL_NAME_TN_HINT = "5020"; //$NON-NLS-1$
-
- /** ClassDiagram :: MODEL_CN */
- public static final IHintedType MODEL_CN = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Model_3024"); //$NON-NLS-1$
-
- public static final String MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT = "7030"; //$NON-NLS-1$
-
- public static final String MODEL_CN_LABEL_NAME_HINT = "5052"; //$NON-NLS-1$
-
- /** ClassDiagram :: DEPENDENCY */
- public static final IHintedType DEPENDENCY = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"); //$NON-NLS-1$
-
- public static final String DEPENDENCY_LABEL_NAME_HINT = "6026"; //$NON-NLS-1$
-
- public static final String DEPENDENCY_LABEL_APPLIED_STEREOTYPE_HINT = "6027"; //$NON-NLS-1$
-
- /** ClassDiagram :: PACKAGE_IMPORT */
- public static final IHintedType PACKAGE_IMPORT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010"); //$NON-NLS-1$
-
- public static final String PACKAGE_IMPORT_LABEL_APPLIED_STEREOTYPE_HINT = "6022"; //$NON-NLS-1$
-
- /** ClassDiagram :: COMMENT_ANNOTATED_ELEMENT */
- public static final IHintedType COMMENT_ANNOTATED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013"); //$NON-NLS-1$
-
- /** ClassDiagram :: ABSTRACTION */
- public static final IHintedType ABSTRACTION = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006"); //$NON-NLS-1$
-
- public static final String ABSTRACTION_LABEL_NAME_HINT = "6014"; //$NON-NLS-1$
-
- public static final String ABSTRACTION_LABEL_APPLIED_STEREOTYPE_HINT = "6015"; //$NON-NLS-1$
-
- /** ClassDiagram :: CONSTRAINT_CONSTRAINED_ELEMENT */
- public static final IHintedType CONSTRAINT_CONSTRAINED_ELEMENT = (IHintedType)getElementType("org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014"); //$NON-NLS-1$
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java
deleted file mode 100644
index 9b24611fd70..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/GraphicalTypeRegistry.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
-/**
- * <pre>
- * This class provides graphical type id (used as View type) for
- * domain element according to their actual or expected graphical
- * container type.
- * </pre>
- */
-public class GraphicalTypeRegistry implements IGraphicalTypeRegistry {
-
- /** A Set containing all known node graphical types */
- protected Set<String> knownNodes = new HashSet<String>();
-
- /** A Set containing all known edge graphical types */
- protected Set<String> knownEdges = new HashSet<String>();
-
- /** Default constructor */
- public GraphicalTypeRegistry() {
-
- // Fill known edges set
- knownEdges.add(ElementTypes.DEPENDENCY.getSemanticHint());
- knownEdges.add(ElementTypes.PACKAGE_IMPORT.getSemanticHint());
- knownEdges.add(ElementTypes.ABSTRACTION.getSemanticHint());
- knownEdges.add(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint());
- knownEdges.add(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint());
-
- // Fill known nodes set (primary nodes)
- knownNodes.add(ElementTypes.PACKAGE.getSemanticHint());
- knownNodes.add(ElementTypes.PACKAGE_CN.getSemanticHint());
- knownNodes.add(ElementTypes.COMMENT.getSemanticHint());
- knownNodes.add(ElementTypes.COMMENT_CN.getSemanticHint());
- knownNodes.add(ElementTypes.CONSTRAINT.getSemanticHint());
- knownNodes.add(ElementTypes.CONSTRAINT_CN.getSemanticHint());
- knownNodes.add(ElementTypes.MODEL.getSemanticHint());
- knownNodes.add(ElementTypes.MODEL_CN.getSemanticHint());
-
- // Fill known nodes set (child label nodes)
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEdgeGraphicalType(EObject domainElement) {
-
- String graphicalType = UNDEFINED_TYPE;
- if(domainElement == null) {
- return UNDEFINED_TYPE;
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Dependency) {
- graphicalType = ElementTypes.DEPENDENCY.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.PackageImport) {
- graphicalType = ElementTypes.PACKAGE_IMPORT.getSemanticHint();
- }
- if(domainElement instanceof org.eclipse.uml2.uml.Abstraction) {
- graphicalType = ElementTypes.ABSTRACTION.getSemanticHint();
- }
- return graphicalType;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEdgeGraphicalType(IElementType elementType) {
- if(elementType instanceof IHintedType) {
- String semanticHint = ((IHintedType)elementType).getSemanticHint();
- return getEdgeGraphicalType(semanticHint);
- }
-
- return UNDEFINED_TYPE;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getEdgeGraphicalType(String proposedType) {
- if(isKnownEdgeType(proposedType)) {
- return proposedType;
- }
-
- return UNDEFINED_TYPE;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getNodeGraphicalType(EObject domainElement, String containerType) {
-
- String graphicalType = UNDEFINED_TYPE;
- if((containerType == null) || (domainElement == null)) {
- return UNDEFINED_TYPE;
- }
-
- if(domainElement instanceof org.eclipse.uml2.uml.Package) {
- if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Package TopNode
- graphicalType = ElementTypes.PACKAGE.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
- graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
- graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
- graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Package ChildNode
- graphicalType = ElementTypes.PACKAGE_CN.getSemanticHint();
- }
-
- }
-
- if(domainElement instanceof org.eclipse.uml2.uml.Comment) {
- if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Comment TopNode
- graphicalType = ElementTypes.COMMENT.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
- graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
- graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
- graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Comment ChildNode
- graphicalType = ElementTypes.COMMENT_CN.getSemanticHint();
- }
-
- }
-
- if(domainElement instanceof org.eclipse.uml2.uml.Constraint) {
- if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Constraint TopNode
- graphicalType = ElementTypes.CONSTRAINT.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
- graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
- graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
- graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Constraint ChildNode
- graphicalType = ElementTypes.CONSTRAINT_CN.getSemanticHint();
- }
-
- }
-
- if(domainElement instanceof org.eclipse.uml2.uml.Model) {
- if(ElementTypes.DIAGRAM_ID.equals(containerType)) { // Model TopNode
- graphicalType = ElementTypes.MODEL.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
- graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
- graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
- graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerType)) { // Model ChildNode
- graphicalType = ElementTypes.MODEL_CN.getSemanticHint();
- }
-
- }
-
- return graphicalType;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getNodeGraphicalType(IElementType elementType, String containerType) {
- if(elementType instanceof IHintedType) {
- String semanticHint = ((IHintedType)elementType).getSemanticHint();
- return getNodeGraphicalType(semanticHint, containerType);
- }
-
- return UNDEFINED_TYPE;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getNodeGraphicalType(String proposedType, String containerType) {
- if(isKnownNodeType(proposedType)) {
- return proposedType;
- }
-
- return UNDEFINED_TYPE;
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isKnownEdgeType(String type) {
- return knownEdges.contains(type);
- }
-
- /**
- * {@inheritDoc}
- */
- public boolean isKnownNodeType(String type) {
- return knownNodes.contains(type);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/IGraphicalTypeRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/IGraphicalTypeRegistry.java
deleted file mode 100644
index 54705c755f9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/IGraphicalTypeRegistry.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-/**
- * This interface provides an API for accessing the local graphical type registry.
- * This registry provides a graphical type for existing model elements.
- */
-public interface IGraphicalTypeRegistry {
-
- /** Constant for undefined graphical type */
- public static final String UNDEFINED_TYPE = "undefined_type";
-
- /**
- * Get a valid edge graphical type for the domain element.
- *
- * @param domainElement
- * the domain element.
- * @return the domain element graphical type.
- */
- public String getEdgeGraphicalType(EObject domainElement);
-
- /**
- * Get a valid edge graphical type for the element type.
- *
- * @param elementType
- * the element type.
- * @param containerType
- * the type of the graphical owner of the domain element.
- * @return the domain element graphical type.
- */
- public String getEdgeGraphicalType(IElementType elementType);
-
- /**
- * Get a valid edge graphical type for the proposed type.
- *
- * @param proposedType
- * the proposed type.
- * @param containerType
- * the type of the graphical owner of the domain element.
- * @return the domain element graphical type.
- */
- public String getEdgeGraphicalType(String proposedType);
-
- /**
- * Get a valid node graphical type for the domain element.
- *
- * @param domainElement
- * the domain element.
- * @param containerType
- * the type of the graphical owner of the domain element.
- * @return the domain element graphical type.
- */
- public String getNodeGraphicalType(EObject domainElement, String containerType);
-
- /**
- * Get a valid node graphical type for the element type.
- *
- * @param elementType
- * the element type.
- * @param containerType
- * the type of the graphical owner of the domain element.
- * @return the domain element graphical type.
- */
- public String getNodeGraphicalType(IElementType elementType, String containerType);
-
- /**
- * Get a valid node graphical type for the proposed type.
- *
- * @param proposedType
- * the proposed type.
- * @param containerType
- * the type of the graphical owner of the domain element.
- * @return the domain element graphical type.
- */
- public String getNodeGraphicalType(String proposedType, String containerType);
-
- /**
- * Test if the type is a known edge graphical type in this diagram
- *
- * @param type
- * the type to test
- * @return true if the type is known
- */
- public boolean isKnownEdgeType(String type);
-
- /**
- * Test if the type is a known node graphical type in this diagram
- *
- * @param type
- * the type to test
- * @return true if the type is known
- */
- public boolean isKnownNodeType(String type);
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java
deleted file mode 100644
index 94072422c12..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramEditPartProvider.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLEditPartProvider;
-
-public class InheritedClassDiagramEditPartProvider extends UMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is a Package Diagram
- if(!ElementTypes.DIAGRAM_ID.equals(view.getDiagram().getType())) {
- return false;
- }
-
- // Test supported inherited types
- EObject eobject = view.getElement();
-
- /** Nodes (and ChildLabelNodes) *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Package) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Comment) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Constraint) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Model) {
- return true;
- }
-
- /** Edges *********** */
- if(eobject instanceof org.eclipse.uml2.uml.Dependency) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.PackageImport) {
- return true;
- }
- if(eobject instanceof org.eclipse.uml2.uml.Abstraction) {
- return true;
- }
-
- // Additional test needed here to decide whether to support Feature type links.
- // As feature type link are not related to a MetaClass from the domain model
- // they are not already handled by previous tests.
- // Also concerns NotationType.
- String hint = view.getType();
-
- /** Edges (Feature) : COMMENT_ANNOTATED_ELEMENT *********** */
- if(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
- /** Edges (Feature) : CONSTRAINT_CONSTRAINED_ELEMENT *********** */
- if(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(hint)) {
- return true;
- }
-
- }
- return false;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java
deleted file mode 100644
index 7f4af02e7dc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/InheritedClassDiagramViewProvider.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateEdgeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateNodeViewOperation;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateViewForKindOperation;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLViewProvider;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-
-public class InheritedClassDiagramViewProvider extends UMLViewProvider {
-
- /** Local graphical type registry */
- protected IGraphicalTypeRegistry registry = new GraphicalTypeRegistry();
-
- @Override
- public Edge createEdge(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- Edge createdEdge = null;
-
- IElementType elementType = (IElementType)semanticAdapter.getAdapter(IElementType.class);
- if(elementType != null) {
- createdEdge = super.createEdge(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- } else {
-
- EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
-
- String domainElementGraphicalType = semanticHint;
- if(domainElementGraphicalType == null) {
- domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
- }
-
- if((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
- // Cannot use createEdge from super class as it never take the graphical type (semanticHint) into account.
- // createdEdge = super.createEdge(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
-
- if(ElementTypes.DEPENDENCY.getSemanticHint().equals(domainElementGraphicalType)) {
- createdEdge = createDependency_4008(domainElement, containerView, index, persisted, preferencesHint);
- }
- if(ElementTypes.PACKAGE_IMPORT.getSemanticHint().equals(domainElementGraphicalType)) {
- createdEdge = createPackageImport_4010(domainElement, containerView, index, persisted, preferencesHint);
- }
- if(ElementTypes.COMMENT_ANNOTATED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
- createdEdge = createCommentAnnotatedElement_4013(containerView, index, persisted, preferencesHint);
- }
- if(ElementTypes.ABSTRACTION.getSemanticHint().equals(domainElementGraphicalType)) {
- createdEdge = createAbstraction_4006(domainElement, containerView, index, persisted, preferencesHint);
- }
- if(ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT.getSemanticHint().equals(domainElementGraphicalType)) {
- createdEdge = createConstraintConstrainedElement_4014(containerView, index, persisted, preferencesHint);
- }
- }
- }
-
- if(createdEdge == null) {
- Activator.log.error(new Exception("Could not create Edge."));
- }
-
- return createdEdge;
- }
-
- @Override
- protected boolean provides(CreateViewForKindOperation op) {
-
- // This provider is registered for Package Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- return true;
- }
-
- @Override
- protected boolean provides(CreateEdgeViewOperation op) {
-
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
-
- // This provider is registered for Package Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- IElementType elementType = getSemanticElementType(op.getSemanticAdapter());
- if(elementType == ElementTypes.DEPENDENCY) {
- return true;
- }
- if(elementType == ElementTypes.PACKAGE_IMPORT) {
- return true;
- }
- if(elementType == ElementTypes.COMMENT_ANNOTATED_ELEMENT) {
- return true;
- }
- if(elementType == ElementTypes.ABSTRACTION) {
- return true;
- }
- if(elementType == ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT) {
- return true;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- String domainElementGraphicalType = op.getSemanticHint();
- if(domainElementGraphicalType == null) {
- domainElementGraphicalType = registry.getEdgeGraphicalType(domainElement);
- }
-
- if((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownEdgeType(domainElementGraphicalType))) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected boolean provides(CreateNodeViewOperation op) {
- // Must have a container
- if(op.getContainerView() == null) {
- return false;
- }
- // Get the type of the container
- String containerGraphicalType = op.getContainerView().getType();
-
- // This provider is registered for Package Diagram only
- String diagramType = op.getContainerView().getDiagram().getType();
- if(!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the ElementType and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
- IElementType elementType = (IElementType)op.getSemanticAdapter().getAdapter(IElementType.class);
- if(elementType == ElementTypes.PACKAGE) {
- if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.PACKAGE_CN) {
- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@5c82e51b (visualID: 3009, editPartClassName: PackageEditPartCN, itemSemanticEditPolicyClassName: PackageItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackageCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: PackageGraphicalNodeEditPolicyCN, createCommandClassName: PackageCreateCommandCN)
- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@7fdefe7e (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@25dfae35 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@68276284 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@45c4105b (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)
- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@668ade35 (name: null) (customPreferencePage: org.eclipse.papyrus.uml.diagram.pkg.CustomPackagePreferencePage, generatePreferencePage: false, generateTool: false)
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.COMMENT) {
- if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.COMMENT_CN) {
- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@243f9178 (visualID: 3028, editPartClassName: CommentEditPartCN, itemSemanticEditPolicyClassName: CommentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: CommentCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: CommentGraphicalNodeEditPolicyCN, createCommandClassName: CommentCreateCommandCN)
- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@7fdefe7e (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@25dfae35 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@68276284 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@45c4105b (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)
- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@1cde2d0f (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false)
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.CONSTRAINT) {
- if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.CONSTRAINT_CN) {
- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@248c8085 (visualID: 3029, editPartClassName: ConstraintEditPartCN, itemSemanticEditPolicyClassName: ConstraintItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ConstraintCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: ConstraintGraphicalNodeEditPolicyCN, createCommandClassName: ConstraintCreateCommandCN)
- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@7fdefe7e (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@25dfae35 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@68276284 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@45c4105b (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)
- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@21b3e77f (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false)
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.MODEL) {
- if(ElementTypes.DIAGRAM_ID.equals(containerGraphicalType)) {
- return true;
- }
- }
- if(elementType == ElementTypes.MODEL_CN) {
- // node: org.eclipse.gmf.codegen.gmfgen.impl.GenChildNodeImpl@4a545b13 (visualID: 3024, editPartClassName: ModelEditPartCN, itemSemanticEditPolicyClassName: ModelItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelCanonicalEditPolicyCN) (primaryDragEditPolicyQualifiedClassName: null, graphicalNodeEditPolicyClassName: ModelGraphicalNodeEditPolicyCN, createCommandClassName: ModelCreateCommandCN)
- // containers: org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@7fdefe7e (visualID: 7010, editPartClassName: PackagePackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@25dfae35 (visualID: 7009, editPartClassName: ModelPackageableElementCompartmentEditPartTN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyTN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyTN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@68276284 (visualID: 7030, editPartClassName: ModelPackageableElementCompartmentEditPartCN, itemSemanticEditPolicyClassName: ModelPackageableElementCompartmentItemSemanticEditPolicyCN, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: ModelPackageableElementCompartmentCanonicalEditPolicyCN) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)org.eclipse.gmf.codegen.gmfgen.impl.GenCompartmentImpl@45c4105b (visualID: 7016, editPartClassName: PackagePackageableElementCompartmentEditPart, itemSemanticEditPolicyClassName: PackagePackageableElementCompartmentItemSemanticEditPolicy, notationViewFactoryClassName: null) (canonicalEditPolicyClassName: PackagePackageableElementCompartmentCanonicalEditPolicy) (title: PackageableElementCompartment, canCollapse: false, hideIfEmpty: true, needsTitle: true, listLayout: false)
- // nodeRef: org.eclipse.papyrus.generation.diagram.idgen.impl.GenNodeRefImpl@756899ca (name: null) (customPreferencePage: null, generatePreferencePage: false, generateTool: false)
- if(ElementTypes.PACKAGE_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.MODEL_CN_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- if(ElementTypes.PACKAGE_COMPARTMENT_PACKAGEABLE_ELEMENT_HINT.equals(containerGraphicalType)) {
- return true;
- }
- }
-
- // /////////////////////////////////////////////////////////////////////
- // Test possibility to provide a view based on the semantic nature and its expected container.
- // /////////////////////////////////////////////////////////////////////
-
- // IElementType may be null (especially when drop from ModelExplorer).
- // In such a case, test the semantic EObject instead.
- if(elementType == null) {
- EObject domainElement = (EObject)op.getSemanticAdapter().getAdapter(EObject.class);
- String domainElementGraphicalType = op.getSemanticHint();
- if(domainElementGraphicalType == null) {
- domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
- } else {
- domainElementGraphicalType = registry.getNodeGraphicalType(domainElementGraphicalType, containerGraphicalType);
- }
-
- if((!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) && (registry.isKnownNodeType(domainElementGraphicalType))) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public Node createNode(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
- if(semanticHint != null) {
- return super.createNode(semanticAdapter, containerView, semanticHint, index, persisted, preferencesHint);
- }
-
- // Use the GraphicalTypeRegistry to find the expected type for a domain element
- // Get the type of the container
- String containerGraphicalType = containerView.getType();
- // Get the type of the domain element
- EObject domainElement = (EObject)semanticAdapter.getAdapter(EObject.class);
- String domainElementGraphicalType = registry.getNodeGraphicalType(domainElement, containerGraphicalType);
-
- // Create the expected node
- if(!IGraphicalTypeRegistry.UNDEFINED_TYPE.equals(domainElementGraphicalType)) {
- return super.createNode(semanticAdapter, containerView, domainElementGraphicalType, index, persisted, preferencesHint);
- }
-
- Activator.log.error(new Exception("Could not create Node."));
- return null;
- }
-
- @Override
- protected void stampShortcut(View containerView, Node target) {
- if(!ElementTypes.DIAGRAM_ID.equals(containerView.getDiagram().getType())) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", ElementTypes.DIAGRAM_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPartProvider.java
deleted file mode 100644
index 54f36345406..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPartProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.papyrus.uml.diagram.pkg.edit.part.PackageDiagramEditPart;
-
-public class PackageDiagramEditPartProvider extends AbstractEditPartProvider {
-
- @Override
- public boolean provides(IOperation operation) {
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
-
- // Ensure current diagram is Package Diagram
- if(ElementTypes.DIAGRAM_ID.equals(view.getType())) {
- return true;
- }
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramEditPartClass(View view) {
- if(ElementTypes.DIAGRAM_ID.equals(view.getType())) {
- return PackageDiagramEditPart.class;
- }
-
- Activator.log.error(new Exception("Could not create EditPart."));
- return null;
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java
deleted file mode 100644
index 2c49c9179df..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramEditPolicyProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.CreateEditPoliciesOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpolicy.IEditPolicyProvider;
-import org.eclipse.papyrus.uml.diagram.pkg.edit.policy.CustomDragDropEditPolicy;
-
-public class PackageDiagramEditPolicyProvider extends AbstractProvider implements IEditPolicyProvider {
-
- public boolean provides(IOperation operation) {
-
- CreateEditPoliciesOperation epOperation = (CreateEditPoliciesOperation)operation;
- if(!(epOperation.getEditPart() instanceof GraphicalEditPart)) {
- return false;
- }
- GraphicalEditPart gep = (GraphicalEditPart)epOperation.getEditPart();
- String diagramType = gep.getNotationView().getDiagram().getType();
- if(!ElementTypes.DIAGRAM_ID.equals(diagramType)) {
- return false;
- }
-
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.CommentEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPart) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ConstraintEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartTN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN) {
- return true;
- }
- if(gep instanceof org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelPackageableElementCompartmentEditPartCN) {
- return true;
- }
-
- return false;
- }
-
- public void createEditPolicies(EditPart editPart) {
- editPart.installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDragDropEditPolicy());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramViewProvider.java
deleted file mode 100644
index 9046fe91dd3..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src-gen/org/eclipse/papyrus/uml/diagram/pkg/provider/PackageDiagramViewProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
-import org.eclipse.gmf.runtime.diagram.core.services.view.CreateDiagramViewOperation;
-import org.eclipse.papyrus.uml.diagram.pkg.Activator;
-import org.eclipse.papyrus.uml.diagram.pkg.factory.PackageDiagramViewFactory;
-
-public class PackageDiagramViewProvider extends AbstractViewProvider {
-
- @Override
- protected boolean provides(CreateDiagramViewOperation operation) {
-
- if(ElementTypes.DIAGRAM_ID.equals(operation.getSemanticHint())) {
- return true;
- }
-
- return false;
- }
-
- @Override
- protected Class<?> getDiagramViewClass(IAdaptable semanticAdapter, String diagramKind) {
- if(ElementTypes.DIAGRAM_ID.equals(diagramKind)) {
- return PackageDiagramViewFactory.class;
- }
-
- Activator.log.error(new Exception("Could not create View."));
- return null;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CreatePackageDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CreatePackageDiagramWithNavigationHandler.java
deleted file mode 100644
index e0b3d3b2897..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CreatePackageDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreatePackageDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreatePackageDiagramWithNavigationHandler() {
- super(new PackageDiagramCreateCommand(), new PackageDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java
deleted file mode 100644
index 9f2c29565fd..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomModelPreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * Nizar GUEDIDI CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.preferences.ModelPreferencePage;
-
-public class CustomModelPreferencePage extends ModelPreferencePage {
-
- static {
- compartmentTitleDefaultVisibilityMap.put("packaged elements", Boolean.FALSE); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java
deleted file mode 100644
index 7332b08f5b9..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/CustomPackagePreferencePage.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * Nizar GUEDIDI CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
-import org.eclipse.papyrus.uml.diagram.pkg.preferences.PackagePreferencePage;
-
-public class CustomPackagePreferencePage extends PackagePreferencePage {
-
- static {
- compartmentTitleDefaultVisibilityMap.put("packaged elements", Boolean.FALSE); //$NON-NLS-1$
- }
-
- /**
- * Initialize defaults using a specified {@link IPreferenceStore}
- *
- * @param store
- * the preference store.
- */
- public static void initDefaults(IPreferenceStore store) {
- // Start of user code custom default initializations
- // End of user code
-
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
- store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
- // Initialize default visibility for compartments in preference page.
- for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
- store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
- }
-
- // Initialize default title visibility for compartments in preference page.
- for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
- store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
- }
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreationCondition.java
deleted file mode 100644
index 08c43df7061..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/PackageDiagramCreationCondition.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- * 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:
- * Atos Origin - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-
-/**
- * PackageDiagramCreationCondition class allows to check if a Class diagram can be added to the
- * selected element.
- */
-public class PackageDiagramCreationCondition extends PerspectiveContextDependence {
-
- /**
- * @return whether the diagram can be created.
- */
- public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package;
- }
- return false;
- }
-
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/CustomDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/CustomDragDropEditPolicy.java
deleted file mode 100644
index fe78e45de1b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/edit/policy/CustomDragDropEditPolicy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.edit.policy;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * <pre>
- * Customization of the DND edit policy for the Package Diagram.
- *
- * Never use specific drop implemented in ClassDiagram, which are
- * related to elements that are not used currently in PackageDiagram.
- * </pre>
- */
-public class CustomDragDropEditPolicy extends PackageDiagramDragDropEditPolicy {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Set<Integer> getDroppableElementVisualId() {
- Set<Integer> droppableElementsVisualID = new HashSet<Integer>();
- return droppableElementsVisualID;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java
deleted file mode 100644
index 6e3fdbe2f3c..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CPackageEditPartProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
-import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.uml.diagram.clazz.custom.providers.CUMLEditPartProvider;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-
-/**
- * Reuse the Custom EditPartProvider from the Class Diagram
- *
- * @author Camille Letavernier
- */
-public class CPackageEditPartProvider extends CUMLEditPartProvider {
-
- @Override
- public synchronized boolean provides(IOperation operation) {
- super.provides(operation);
- if(operation instanceof CreateGraphicEditPartOperation) {
- View view = ((IEditPartOperation)operation).getView();
- if(!ElementTypes.DIAGRAM_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
- return false;
- }
- if(isAllowCaching() && getCachedPart(view) != null) {
- return true;
- }
- IGraphicalEditPart part = createEditPart(view);
- if(part != null) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CustomEditPolicyProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CustomEditPolicyProvider.java
deleted file mode 100644
index cd58245db87..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg/src/org/eclipse/papyrus/uml/diagram/pkg/provider/CustomEditPolicyProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * 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:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.provider;
-
-import org.eclipse.gef.EditPart;
-
-public class CustomEditPolicyProvider extends PackageDiagramEditPolicyProvider {
-
- @Override
- public void createEditPolicies(EditPart editPart) {
- super.createEditPolicies(editPart);
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF
index 6464f04410f..f64cb487ea0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF
@@ -78,13 +78,12 @@ Require-Bundle: org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.
org.eclipse.emf.ecore.edit,
org.eclipse.ocl.ecore,
org.eclipse.emf.validation,
- org.eclipse.gef
+ org.eclipse.gef,
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.profile.part.UMLDiag
- ramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.profile;singleton
- :=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.profile; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileDiagramWithNavigationHandler.java
deleted file mode 100644
index 99300d9cbbe..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/CreateProfileDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.profile;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateProfileDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateProfileDiagramWithNavigationHandler() {
- super(new CreateProfileDiagramCommand(), new ProfileDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/ProfileDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/ProfileDiagramCreationCondition.java
index 7b5240983bb..a1cb00e9b7f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/ProfileDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/ProfileDiagramCreationCondition.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.profile;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Profile;
/**
* ProfileDiagramCreationCondition class allows to check if a Profile diagram can be added to the
@@ -24,9 +23,6 @@ public class ProfileDiagramCreationCondition extends PerspectiveContextDependenc
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof Profile;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java
index 2d5f5c4192e..d74dfd36c8e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java
@@ -68,7 +68,7 @@ public class CustomAssociationCreateCommand extends org.eclipse.papyrus.uml.diag
}
if(source instanceof Type && target instanceof Type && container instanceof Package) {
- Association newElement = (Association)ProfileDiagramAssociationHelper.createAssociation(getEditingDomain(), (Type)source, (Type)target, container);
+ Association newElement = (Association) ProfileDiagramAssociationHelper.createAssociation(getEditingDomain(), (Type) source, (Type) target, container, null);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java
index 77c25c81ff3..5ad3a99b783 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Association;
@@ -39,8 +40,8 @@ public class PropertyCommandForAssociation extends ClassPropertyCreateCommand {
* @param req
* the req to launch the command
*/
- public PropertyCommandForAssociation(CreateElementRequest req) {
- super(req);
+ public PropertyCommandForAssociation(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java
index 1b53bdd9ac4..5405d72767d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java
@@ -49,6 +49,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DeleteLinkDuringCreationCommand;
import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
@@ -374,7 +375,7 @@ public class MultiAssociationHelper extends ElementHelper {
// 3.1 creation of the property
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement); //$NON-NLS-1$
- EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request);
+ EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(sourceEditPart));
propertyCreateCommand.setReuseParentTransaction(true);
((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
@@ -456,7 +457,7 @@ public class MultiAssociationHelper extends ElementHelper {
// 0. add semantic
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement); //$NON-NLS-1$
- EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request);
+ EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(sourceEditPart));
((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
//System.err.println("0. add semantic, can execute?" + command.canExecute());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java
index 1bd91b82a59..ca1a2132fee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.common.helper.NamedElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.commands.PropertyCommandForAssociation;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
@@ -42,24 +43,26 @@ public class ProfileDiagramAssociationHelper {
* Returns the created Association corresponding to these parameters
*
* @param domain
- * the {@link TransactionalEditingDomain}
+ * the {@link TransactionalEditingDomain}
* @param source
- * the source of the {@link Association}
+ * the source of the {@link Association}
* @param target
- * the target of the {@link Association}
+ * the target of the {@link Association}
* @param container
- * the {@link Container} of the {@link Association}
+ * the {@link Container} of the {@link Association}
+ * @param diagram
+ * the current diagram
* @return
* The created Association corresponding to these parameters
*/
- public static EObject createAssociation(TransactionalEditingDomain domain, Type source, Type target, Package container) {
+ public static EObject createAssociation(TransactionalEditingDomain domain, Type source, Type target, Package container, Diagram diagram) {
Association association = UMLFactory.eINSTANCE.createAssociation();
String targetString = target.getName().substring(0, 1).toLowerCase() + target.getName().substring(1, target.getName().length());
String sourceString = source.getName().substring(0, 1).toLowerCase() + source.getName().substring(1, source.getName().length());
// create target property
CreateElementRequest request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- EditElementCommand c = new PropertyCommandForAssociation(request);
+ EditElementCommand c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
@@ -81,7 +84,7 @@ public class ProfileDiagramAssociationHelper {
// create source property
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
- c = new PropertyCommandForAssociation(request);
+ c = new PropertyCommandForAssociation(request, diagram);
try {
c.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
index 6c1a36c3b01..bc3e7d69ba6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen
@@ -1241,7 +1241,7 @@
<children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.pathmaps" name="Pathmaps" kind="Pathmaps"/>
</preferencePages>
</diagram>
- <plugin iD="org.eclipse.papyrus.uml.diagram.profile" name="PapyrusUMLProfileDiagram" provider="CEA LIST" version="1.0.0.vqualifier">
+ <plugin iD="org.eclipse.papyrus.uml.diagram.profile" name="PapyrusUMLProfileDiagram" provider="CEA LIST" version="1.0.0.qualifier">
<requiredPlugins>org.eclipse.draw2d</requiredPlugins>
<requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
index dbdd1c909e6..0140f6c0a48 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml
@@ -994,51 +994,6 @@
sequence="F5"/>
</extension>
-<extension
- point="org.eclipse.ui.menus">
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand"
- icon="icons/obj16/Diagram_Profile.gif"
- label="Create a new Profile Diagram"
- style="push"
- tooltip="Create a new Profile Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLProfile"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand"
- icon="icons/obj16/Diagram_Profile.gif"
- label="Create a new Profile Diagram"
- style="push"
- tooltip="Create a new Profile Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLProfile"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand"
- icon="icons/obj16/Diagram_Profile.gif"
- label="Create a new Profile Diagram"
- style="push"
- tooltip="Create a new Profile Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLProfile"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
<extension point="org.eclipse.ui.menus" id="context-menus">
<?gmfgen generated="true"?>
@@ -1290,21 +1245,6 @@
name="New PapyII Profile Diagram( Papyrus II)">
</command>
</extension>
-<extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand">
- <activeWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </activeWhen>
- </handler>
-</extension>
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
index 1892a88e39f..e15047a7625 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public AssociationNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public AssociationNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static AssociationNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new AssociationNodeCreateCommand(req, eObject);
+ public static AssociationNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new AssociationNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public AssociationNodeCreateCommand(CreateElementRequest req) {
+ public AssociationNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAssociation());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class AssociationNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Association newElement = UMLFactory.eINSTANCE.createAssociation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
index b4ea73286a2..bd14b5496c3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ClassOperationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ClassOperationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ClassOperationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ClassOperationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassOperationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ClassOperationCreateCommand(req, eObject);
+ public static ClassOperationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassOperationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassOperationCreateCommand(CreateElementRequest req) {
+ public ClassOperationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ClassOperationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ClassOperationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- Class owner = (Class)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3020(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
index 37ab2976f34..b8b6ab47422 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.StructuredClassifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ClassPropertyCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ClassPropertyCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ClassPropertyCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ClassPropertyCreateCommand(req, eObject);
+ public static ClassPropertyCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ClassPropertyCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ClassPropertyCreateCommand(CreateElementRequest req) {
+ public ClassPropertyCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ClassPropertyCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
index f7656c486c7..a4f86c43308 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_1007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
index 893a03df628..3d0cd08bc93 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentEditPartCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentEditPartCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentEditPartCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentEditPartCreateCommand(req, eObject);
+ public static CommentEditPartCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentEditPartCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentEditPartCreateCommand(CreateElementRequest req) {
+ public CommentEditPartCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentEditPartCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_1002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
index ecd94230efc..d912e3f52c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_1014(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
index b8967a509b3..2b84e48cfd3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandCN(req, eObject);
+ public static ConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandCN(CreateElementRequest req) {
+ public ConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_1028(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
index 1099dec110c..82670619774 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommand(req, eObject);
+ public static DataTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommand(CreateElementRequest req) {
+ public DataTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_2010(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
index 2f2302e4159..7a9da15a613 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new DataTypeCreateCommandCN(req, eObject);
+ public static DataTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeCreateCommandCN(CreateElementRequest req) {
+ public DataTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DataType newElement = UMLFactory.eINSTANCE.createDataType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DataType_3027(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
index 6173070ed63..dca0c1628b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataTypeOperationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataTypeOperationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypeOperationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataTypeOperationCreateCommand(req, eObject);
+ public static DataTypeOperationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypeOperationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypeOperationCreateCommand(CreateElementRequest req) {
+ public DataTypeOperationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypeOperationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Operation newElement = UMLFactory.eINSTANCE.createOperation();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedOperations().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedOperations().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Operation_3019(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
index eb8e6085e5a..21e93277d69 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DataTypePropertyCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DataTypePropertyCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DataTypePropertyCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DataTypePropertyCreateCommand(req, eObject);
+ public static DataTypePropertyCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DataTypePropertyCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DataTypePropertyCreateCommand(CreateElementRequest req) {
+ public DataTypePropertyCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DataTypePropertyCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Property newElement = UMLFactory.eINSTANCE.createProperty();
- DataType owner = (DataType)getElementToEdit();
- owner.getOwnedAttributes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ DataType qualifiedTarget = (DataType)target;
+ qualifiedTarget.getOwnedAttributes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Property_3018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
index 58d2c0c0313..cde0a27a69e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Dependency;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DependencyNodeCreateCommand(req, eObject);
+ public static DependencyNodeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DependencyNodeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DependencyNodeCreateCommand(CreateElementRequest req) {
+ public DependencyNodeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class DependencyNodeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
index 828b566d389..18ad56a25df 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommand(req, eObject);
+ public static EnumerationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommand(CreateElementRequest req) {
+ public EnumerationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_2006(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
index fb487bb5eda..e1fc1c2652b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new EnumerationCreateCommandCN(req, eObject);
+ public static EnumerationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationCreateCommandCN(CreateElementRequest req) {
+ public EnumerationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Enumeration_3025(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
index 297ba3d0a79..ec3811234e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.EnumerationLiteral;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EnumerationLiteralCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EnumerationLiteralCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EnumerationLiteralCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EnumerationLiteralCreateCommand(req, eObject);
+ public static EnumerationLiteralCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EnumerationLiteralCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EnumerationLiteralCreateCommand(CreateElementRequest req) {
+ public EnumerationLiteralCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
- Enumeration owner = (Enumeration)getElementToEdit();
- owner.getOwnedLiterals().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Enumeration qualifiedTarget = (Enumeration)target;
+ qualifiedTarget.getOwnedLiterals().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_EnumerationLiteral_1037(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
index 1075ed082d0..e8b1d6ac520 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class MetaclassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class MetaclassCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MetaclassCreateCommand(CreateElementRequest req, EObject eObject) {
+ public MetaclassCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static MetaclassCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new MetaclassCreateCommand(req, eObject);
+ public static MetaclassCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new MetaclassCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public MetaclassCreateCommand(CreateElementRequest req) {
+ public MetaclassCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class MetaclassCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class MetaclassCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_1031(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
index 0f688db4951..b9e2c735bdc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public MetaclassCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public MetaclassCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static MetaclassCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new MetaclassCreateCommandCN(req, eObject);
+ public static MetaclassCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new MetaclassCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public MetaclassCreateCommandCN(CreateElementRequest req) {
+ public MetaclassCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class MetaclassCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Class newElement = UMLFactory.eINSTANCE.createClass();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Class_3028(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
index df8096a38b4..8b599d7d1e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ModelCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandCN(req, eObject);
+ public static ModelCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandCN(CreateElementRequest req) {
+ public ModelCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ModelCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ModelCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_1027(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
index fef0c36c1f6..9dcbfe97968 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ModelCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ModelCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ModelCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ModelCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ModelCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ModelCreateCommandTN(req, eObject);
+ public static ModelCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ModelCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ModelCreateCommandTN(CreateElementRequest req) {
+ public ModelCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ModelCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ModelCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Model newElement = UMLFactory.eINSTANCE.createModel();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Model_2005(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
index 169130d4d46..26d111af1d7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommand(req, eObject);
+ public static PackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommand(CreateElementRequest req) {
+ public PackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_2007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
index a6c38f618d6..ecbf810ad3e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandCN(req, eObject);
+ public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req) {
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PackageCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_1012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
index feb81be1460..5eb398e2a1c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommand(req, eObject);
+ public static PrimitiveTypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommand(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_2009(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
index 7e37c877ce7..250c864705d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PrimitiveTypeCreateCommandCN(req, eObject);
+ public static PrimitiveTypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PrimitiveTypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PrimitiveTypeCreateCommandCN(CreateElementRequest req) {
+ public PrimitiveTypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_PrimitiveType_3026(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
index 51ee2b219ab..530c201f056 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ProfileCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ProfileCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public ProfileCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public ProfileCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ProfileCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new ProfileCreateCommandCN(req, eObject);
+ public static ProfileCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ProfileCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public ProfileCreateCommandCN(CreateElementRequest req) {
+ public ProfileCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ProfileCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ProfileCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Profile newElement = UMLFactory.eINSTANCE.createProfile();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Profile_1024(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
index 9ba8cb4d502..7f9aba0f687 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ProfileCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ProfileCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ProfileCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ProfileCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ProfileCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ProfileCreateCommandTN(req, eObject);
+ public static ProfileCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ProfileCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ProfileCreateCommandTN(CreateElementRequest req) {
+ public ProfileCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ProfileCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ProfileCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Profile newElement = UMLFactory.eINSTANCE.createProfile();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Profile_1030(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
index 2da73b61d4c..45baa2b3ab7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java
@@ -37,7 +37,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +47,25 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShortCutDiagramCreateCommand(req, eObject);
+ public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShortCutDiagramCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
index 76a757dd4d5..d873106e5e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StereotypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StereotypeCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public StereotypeCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StereotypeCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StereotypeCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StereotypeCreateCommand(req, eObject);
+ public static StereotypeCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StereotypeCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StereotypeCreateCommand(CreateElementRequest req) {
+ public StereotypeCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class StereotypeCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class StereotypeCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
- Package owner = (Package)getElementToEdit();
- owner.getOwnedStereotypes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getOwnedStereotypes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Stereotype_1026(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
index 09d0f4c9556..9e28742c3ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public StereotypeCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public StereotypeCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StereotypeCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new StereotypeCreateCommandCN(req, eObject);
+ public static StereotypeCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StereotypeCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public StereotypeCreateCommandCN(CreateElementRequest req) {
+ public StereotypeCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class StereotypeCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
- Package owner = (Package)getElementToEdit();
- owner.getOwnedStereotypes().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getOwnedStereotypes().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Stereotype_1023(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
index 34db2e8b22d..e251b13e49f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypePropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypePropertyCreateCommand(req));
+ return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
index bb44b84368c..c9fa0a87d87 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypePropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypePropertyCreateCommand(req));
+ return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
index 8bcf29e809b..1f2b1498e67 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeOperationCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeOperationCreateCommand(req));
+ return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
index 983a500c179..19d55d0a312 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeOperationCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeOperationCreateCommand(req));
+ return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
index 2118d34b248..2ae67efa915 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.EnumerationLiteralCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommand(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
index 7a6f8f8bbd5..449b39ff4a8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.EnumerationLiteralCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationLiteralCreateCommand(req));
+ return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
index cbf611fb2ec..4bc93540d2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -64,49 +65,49 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
index d6f0b930619..996af869f74 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -64,49 +65,49 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
index 79079388c29..0c64616f04a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java
@@ -38,6 +38,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -114,7 +115,7 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index be6d57e7374..3abd078798c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -64,49 +65,49 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
index 6c5f53d1cdb..368195c3f7e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -64,49 +65,49 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
index 19fc56375c5..348fbb9f59c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationNodeCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentEditPartCreateCommand;
@@ -74,79 +75,79 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DependencyNodeCreateCommand(req));
+ return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Association_2015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationNodeCreateCommand(req));
+ return getGEFWrapper(new AssociationNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Stereotype_1026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StereotypeCreateCommand(req));
+ return getGEFWrapper(new StereotypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_1031 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MetaclassCreateCommand(req));
+ return getGEFWrapper(new MetaclassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_1002 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentEditPartCreateCommand(req));
+ return getGEFWrapper(new CommentEditPartCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1014 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_2005 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandTN(req));
+ return getGEFWrapper(new ModelCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1030 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandTN(req));
+ return getGEFWrapper(new ProfileCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_2007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommand(req));
+ return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_2006 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommand(req));
+ return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_2009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommand(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_2010 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommand(req));
+ return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Diagram_2016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShortCutDiagramCreateCommand(req));
+ return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
index b4af3a90901..95339f6d229 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -66,61 +67,61 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StereotypeCreateCommandCN(req));
+ return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_1007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MetaclassCreateCommandCN(req));
+ return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
index 8c917e04bc1..fd27609fb7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -66,61 +67,61 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StereotypeCreateCommandCN(req));
+ return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Model_1027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ModelCreateCommandCN(req));
+ return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Profile_1024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ProfileCreateCommandCN(req));
+ return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_1012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_1028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandCN(req));
+ return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Enumeration_3025 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EnumerationCreateCommandCN(req));
+ return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req));
+ return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DataType_3027 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DataTypeCreateCommandCN(req));
+ return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_1007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Class_3028 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MetaclassCreateCommandCN(req));
+ return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
index 0eb212b9a93..429f607c13a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicy extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassPropertyCreateCommand(req));
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
index 3df6aeea8fb..092dfbd4373 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLB
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassPropertyCreateCommand(req));
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
index de4e6282012..6e579c8b851 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicy extends UMLBas
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassOperationCreateCommand(req));
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
index 9303a158233..9f5dd0b9126 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicyCN extends UMLB
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ClassOperationCreateCommand(req));
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
index ed084c0adea..eff446e1242 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java
@@ -183,13 +183,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getProfile().isSuperTypeOf(domainElement.eClass()) && isDiagram((Profile)domainElement)) {
- return ProfileDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return ProfileDiagramEditPart.VISUAL_ID;
}
/**
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 f986c06dea4..137f52cd889 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
@@ -65,19 +65,18 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
org.eclipse.gmf.tooling.runtime,
org.eclipse.papyrus.uml.diagram.menu;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.constraints;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.constraints;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.part.UMLDia
- gramEditorPlugin
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.sequence.part.UMLDiagramEditorPlugin
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence;singleto
- n:=true
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.sequence; singleton:=true
Import-Package: org.eclipse.core.databinding.observable,
org.eclipse.papyrus.infra.emf.databinding,
org.eclipse.papyrus.infra.tools.databinding,
org.eclipse.papyrus.uml.tools.databinding,
org.eclipse.papyrus.views.properties.contexts,
org.eclipse.papyrus.views.properties.modelelement
-
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java
deleted file mode 100644
index 9ac52e8aa9f..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/CreateSequenceDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.sequence;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateSequenceDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateSequenceDiagramWithNavigationHandler() {
- super(new CreateSequenceDiagramCommand(), new SequenceDiagramCreationCondition());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java
index 5f701bcc345..eeb5331c50f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/SequenceDiagramCreationCondition.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.sequence;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.Interaction;
/**
* SequenceDiagramCreationCondition class allows to check if a Sequence diagram can be added to the
@@ -25,10 +24,6 @@ public class SequenceDiagramCreationCondition extends PerspectiveContextDependen
*/
@Override
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- // TODO : to specify according to the spec
- return selectedElement instanceof Interaction;
- }
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java
index b606523c5a9..0fa6f7c087a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomActionExecutionSpecificationCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ActionExecutionSpecificationCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -37,8 +38,8 @@ public class CustomActionExecutionSpecificationCreateCommand extends ActionExecu
* @param req
* @param eObject
*/
- public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -46,8 +47,8 @@ public class CustomActionExecutionSpecificationCreateCommand extends ActionExecu
*
* @param req
*/
- public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomActionExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java
index 3524e205cbf..73095cc1c9f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomBehaviorExecutionSpecificationCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.BehaviorExecutionSpecificationCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -37,8 +38,8 @@ public class CustomBehaviorExecutionSpecificationCreateCommand extends BehaviorE
* @param req
* @param eObject
*/
- public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -46,8 +47,8 @@ public class CustomBehaviorExecutionSpecificationCreateCommand extends BehaviorE
*
* @param req
*/
- public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomBehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java
index 31df7eff2fc..97b5e9d1e6f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragment2CreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragment2CreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -36,8 +37,8 @@ public class CustomCombinedFragment2CreateCommand extends CombinedFragment2Creat
* @param req
* @param eObject
*/
- public CustomCombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomCombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -45,8 +46,8 @@ public class CustomCombinedFragment2CreateCommand extends CombinedFragment2Creat
*
* @param req
*/
- public CustomCombinedFragment2CreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomCombinedFragment2CreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java
index 98c68a5360a..41320d8ee3f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomCombinedFragmentCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -41,8 +42,8 @@ public class CustomCombinedFragmentCreateCommand extends CombinedFragmentCreateC
* @param req
* @param eObject
*/
- public CustomCombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomCombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -50,8 +51,8 @@ public class CustomCombinedFragmentCreateCommand extends CombinedFragmentCreateC
*
* @param req
*/
- public CustomCombinedFragmentCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomCombinedFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java
index df07d86fcdc..c7cfa87305d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConsiderIgnoreFragmentCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -42,8 +43,8 @@ public class CustomConsiderIgnoreFragmentCreateCommand extends ConsiderIgnoreFra
* @param req
* @param eObject
*/
- public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -51,8 +52,8 @@ public class CustomConsiderIgnoreFragmentCreateCommand extends ConsiderIgnoreFra
*
* @param req
*/
- public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java
index 523990ac3db..89182ed481c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomConstraintCreateCommand.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.command;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConstraintCreateCommand;
import org.eclipse.uml2.uml.Lifeline;
@@ -33,8 +34,8 @@ public class CustomConstraintCreateCommand extends ConstraintCreateCommand {
* @param req
* @param eObject
*/
- public CustomConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
this.eObject = eObject;
}
@@ -43,8 +44,8 @@ public class CustomConstraintCreateCommand extends ConstraintCreateCommand {
*
* @param req
*/
- public CustomConstraintCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
protected EObject getElementToEdit() {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java
index 38d1181ce83..8c312db57e5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomContinuationCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ContinuationCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.CombinedFragment;
@@ -39,8 +40,8 @@ public class CustomContinuationCreateCommand extends ContinuationCreateCommand {
* @param req
* @param eObject
*/
- public CustomContinuationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -48,8 +49,8 @@ public class CustomContinuationCreateCommand extends ContinuationCreateCommand {
*
* @param req
*/
- public CustomContinuationCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomContinuationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java
index 19268067955..80de7c7c4d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDestructionOccurrenceSpecificationCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DestructionOccurrenceSpecificationCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
@@ -38,8 +39,8 @@ public class CustomDestructionOccurrenceSpecificationCreateCommand extends Destr
* @param req
* @param eObject
*/
- public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -47,8 +48,8 @@ public class CustomDestructionOccurrenceSpecificationCreateCommand extends Destr
*
* @param req
*/
- public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomDestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java
index 0c3622370e4..ad9124326a7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -42,8 +43,8 @@ public class CustomDurationConstraintCreateCommand extends DurationConstraintCre
* @param req
* @param eObject
*/
- public CustomDurationConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomDurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -51,8 +52,8 @@ public class CustomDurationConstraintCreateCommand extends DurationConstraintCre
*
* @param req
*/
- public CustomDurationConstraintCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomDurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java
index 988bc22ea0a..0c86a091340 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationConstraintInMessageCreateCommand.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.command;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationConstraintInMessageCreateCommand;
/**
@@ -28,8 +29,8 @@ public class CustomDurationConstraintInMessageCreateCommand extends DurationCons
* @param req
* @param eObject
*/
- public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -37,8 +38,8 @@ public class CustomDurationConstraintInMessageCreateCommand extends DurationCons
*
* @param req
*/
- public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomDurationConstraintInMessageCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java
index 5b553c993b4..335a4892e7d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomDurationObservationCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.DurationObservationCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -41,8 +42,8 @@ public class CustomDurationObservationCreateCommand extends DurationObservationC
* @param req
* @param eObject
*/
- public CustomDurationObservationCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomDurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -50,8 +51,8 @@ public class CustomDurationObservationCreateCommand extends DurationObservationC
*
* @param req
*/
- public CustomDurationObservationCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomDurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java
index 31d3f97958c..5550e5c2e5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.BehavioredClassifier;
@@ -37,8 +38,8 @@ public class CustomInteractionCreateCommand extends InteractionCreateCommand {
* @param req
* @param eObject
*/
- public CustomInteractionCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomInteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -46,8 +47,8 @@ public class CustomInteractionCreateCommand extends InteractionCreateCommand {
*
* @param req
*/
- public CustomInteractionCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomInteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java
index bcb1f899901..3e0a3f65f80 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionOperandCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionOperandCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -43,8 +44,8 @@ public class CustomInteractionOperandCreateCommand extends InteractionOperandCre
* @param req
* @param eObject
*/
- public CustomInteractionOperandCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomInteractionOperandCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -52,8 +53,8 @@ public class CustomInteractionOperandCreateCommand extends InteractionOperandCre
*
* @param req
*/
- public CustomInteractionOperandCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomInteractionOperandCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java
index dbec50e8f2e..dd326bf19aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomInteractionUseCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionUseCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
@@ -37,8 +38,8 @@ public class CustomInteractionUseCreateCommand extends InteractionUseCreateComma
* @param req
* @param eObject
*/
- public CustomInteractionUseCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomInteractionUseCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -46,8 +47,8 @@ public class CustomInteractionUseCreateCommand extends InteractionUseCreateComma
*
* @param req
*/
- public CustomInteractionUseCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomInteractionUseCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java
index a1ec0684923..741c0379f14 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomLifelineCreateCommand.java
@@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.LifelineCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
@@ -53,8 +54,8 @@ public class CustomLifelineCreateCommand extends LifelineCreateCommand {
* @param req
* @param eObject
*/
- public CustomLifelineCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomLifelineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -62,8 +63,8 @@ public class CustomLifelineCreateCommand extends LifelineCreateCommand {
*
* @param req
*/
- public CustomLifelineCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomLifelineCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java
index b5aed9e1e64..a8a1a438871 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomStateInvariantCreateCommand.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.StateInvariantCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.util.CommandHelper;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -36,8 +37,8 @@ public class CustomStateInvariantCreateCommand extends StateInvariantCreateComma
* @param req
* @param eObject
*/
- public CustomStateInvariantCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomStateInvariantCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -45,8 +46,8 @@ public class CustomStateInvariantCreateCommand extends StateInvariantCreateComma
*
* @param req
*/
- public CustomStateInvariantCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomStateInvariantCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java
index 241617aeaa4..491384be237 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/command/CustomTimeConstraintCreateCommand.java
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.TimeConstraintCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.sequence.util.SequenceRequestConstant;
@@ -44,8 +45,8 @@ public class CustomTimeConstraintCreateCommand extends TimeConstraintCreateComma
* @param req
* @param eObject
*/
- public CustomTimeConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
- super(req, eObject);
+ public CustomTimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req, eObject, diagram);
}
/**
@@ -53,8 +54,8 @@ public class CustomTimeConstraintCreateCommand extends TimeConstraintCreateComma
*
* @param req
*/
- public CustomTimeConstraintCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomTimeConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
index eff27a8d0ab..3a746d5d6ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
@@ -19,6 +19,7 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.gef.commands.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionOperandCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -52,7 +53,7 @@ public class CustomCombinedFragmentCombinedFragmentCompartmentItemSemanticEditPo
}
// make compound command
CompoundCommand result = new CompoundCommand();
- Command cmd = getGEFWrapper(new CustomInteractionOperandCreateCommand(req));
+ Command cmd = getGEFWrapper(new CustomInteractionOperandCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
result.add(cmd);
// append a command which notifies
// Fixed bug: remove the notify dialog, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402977
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
index a628bc7e83e..a8f4ecab65d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionInteractionCompartmentItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCombinedFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConsiderIgnoreFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintCreateCommand;
@@ -38,31 +39,31 @@ public class CustomInteractionInteractionCompartmentItemSemanticEditPolicy exten
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
- return getGEFWrapper(new CustomLifelineCreateCommand(req));
+ return getGEFWrapper(new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3008 == req.getElementType()) {
- return getGEFWrapper(new CustomConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3009 == req.getElementType()) {
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
return getGEFWrapper(new CustomTimeObservationCreateCommand(req));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3021 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
index adf80307fd2..ed33cec95e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
@@ -68,10 +69,10 @@ public class CustomInteractionItemSemanticEditPolicy extends InteractionItemSema
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintInMessageCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintInMessageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
index 39a1c4547c5..45f52fbda6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomInteractionOperandItemSemanticEditPolicy.java
@@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCombinedFragmentCreateCommand;
@@ -80,16 +81,16 @@ public class CustomInteractionOperandItemSemanticEditPolicy extends InteractionO
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.InteractionUse_3002 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionUseCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConsiderIgnoreFragment_3007 == req.getElementType()) {
- return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Continuation_3016 == req.getElementType()) {
- return getGEFWrapper(new CustomContinuationCreateCommand(req));
+ return getGEFWrapper(new CustomContinuationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
index 86f6ba5b09e..54c00bcf5d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomLifelineItemSemanticEditPolicy.java
@@ -29,6 +29,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomActionExecutionSpecificationCreateCommand;
@@ -93,42 +94,42 @@ public class CustomLifelineItemSemanticEditPolicy extends LifelineItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.ActionExecutionSpecification_3006 == req.getElementType()) {
- return getGEFWrapper(new CustomActionExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomActionExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.BehaviorExecutionSpecification_3003 == req.getElementType()) {
- return getGEFWrapper(new CustomBehaviorExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomBehaviorExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateInvariant_3017 == req.getElementType()) {
- return getGEFWrapper(new CustomStateInvariantCreateCommand(req));
+ return getGEFWrapper(new CustomStateInvariantCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3018 == req.getElementType()) {
- return getGEFWrapper(new CustomCombinedFragment2CreateCommand(req));
+ return getGEFWrapper(new CustomCombinedFragment2CreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3019 == req.getElementType()) {
- return getGEFWrapper(new CustomTimeConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomTimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
//Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
// if(UMLElementTypes.TimeObservation_3020 == req.getElementType()) {
// return getGEFWrapper(new TimeObservationCreateCommand(req));
// }
if(UMLElementTypes.DurationConstraint_3021 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_3022 == req.getElementType()) {
- return getGEFWrapper(new CustomDestructionOccurrenceSpecificationCreateCommand(req));
+ return getGEFWrapper(new CustomDestructionOccurrenceSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
//add lifelines
if(UMLElementTypes.Lifeline_3001 == req.getElementType()) {
CustomLifelineEditPart lifelineEditPart = (CustomLifelineEditPart)getHost();
if(lifelineEditPart.isInlineCapability()) {
- CustomLifelineCreateCommand cmd = new CustomLifelineCreateCommand(req);
+ CustomLifelineCreateCommand cmd = new CustomLifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost()));
cmd.setAvailableProperties(lifelineEditPart.getAvailableProperties());
return getGEFWrapper(cmd);
}
}
//add DurationObservation/Constraint
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
// Fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=364826
// if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
index d3a38ec96de..200487329aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage2ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage2ItemSemanticEditPolicy extends Message2ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
index 64a5b8a7cce..8a0adca4859 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage3ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage3ItemSemanticEditPolicy extends Message3ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
index 79af282f9df..b06f09f1b90 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage4ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -71,10 +72,10 @@ public class CustomMessage4ItemSemanticEditPolicy extends Message4ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
index be8f0da4b7d..1ff17e3e08f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage5ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage5ItemSemanticEditPolicy extends Message5ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
index e2f3a907e1c..dff3856f165 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage6ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage6ItemSemanticEditPolicy extends Message6ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
index 465e67f3f44..2e2b82ac8fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessage7ItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessage7ItemSemanticEditPolicy extends Message7ItemSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
index 1bc40b19bfb..bf6d84a1486 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomMessageItemSemanticEditPolicy.java
@@ -23,6 +23,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomCommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomConstraintConstrainedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomDurationConstraintCreateCommand;
@@ -70,10 +71,10 @@ public class CustomMessageItemSemanticEditPolicy extends MessageItemSemanticEdit
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.DurationConstraint_3023 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationConstraintCreateCommand(req));
+ return getGEFWrapper(new CustomDurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == req.getElementType()) {
- return getGEFWrapper(new CustomDurationObservationCreateCommand(req));
+ return getGEFWrapper(new CustomDurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
index 3a2b208bbad..8fc2f65b830 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/semantic/CustomPackageItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies.semantic;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.command.CustomInteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.policies.PackageItemSemanticEditPolicy;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -30,7 +31,7 @@ public class CustomPackageItemSemanticEditPolicy extends PackageItemSemanticEdit
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.Interaction_2001 == req.getElementType()) {
- return getGEFWrapper(new CustomInteractionCreateCommand(req));
+ return getGEFWrapper(new CustomInteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
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 71d50b24796..75d882f2d56 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
@@ -45,77 +45,7 @@
</command>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
-
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.sequence.CreateSequenceDiagramCommand"
- icon="icons/obj16/Diagram_Sequence.gif"
- label="Create a new Sequence Diagram"
- style="push"
- tooltip="Create a new Sequence Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- </extension>
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
index e5ef3fcd60b..c5c64281966 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ActionExecutionSpecificationCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.ActionExecutionSpecification;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ActionExecutionSpecificationCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ActionExecutionSpecificationCreateCommand extends EditElementComman
/**
* @generated
*/
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActionExecutionSpecificationCreateCommand(req, eObject);
+ public static ActionExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActionExecutionSpecificationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActionExecutionSpecificationCreateCommand(CreateElementRequest req) {
+ public ActionExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +94,9 @@ public class ActionExecutionSpecificationCreateCommand extends EditElementComman
*/
@Override
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActionExecutionSpecification());
+ return data.isPermitted();
}
/**
@@ -100,8 +107,19 @@ public class ActionExecutionSpecificationCreateCommand extends EditElementComman
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ActionExecutionSpecification newElement = UMLFactory.eINSTANCE.createActionExecutionSpecification();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
index d37ede2064e..62d12593c89 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/BehaviorExecutionSpecificationCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.BehaviorExecutionSpecification;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class BehaviorExecutionSpecificationCreateCommand extends EditElementComm
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class BehaviorExecutionSpecificationCreateCommand extends EditElementComm
/**
* @generated
*/
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new BehaviorExecutionSpecificationCreateCommand(req, eObject);
+ public static BehaviorExecutionSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new BehaviorExecutionSpecificationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req) {
+ public BehaviorExecutionSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +94,9 @@ public class BehaviorExecutionSpecificationCreateCommand extends EditElementComm
*/
@Override
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehaviorExecutionSpecification());
+ return data.isPermitted();
}
/**
@@ -100,8 +107,19 @@ public class BehaviorExecutionSpecificationCreateCommand extends EditElementComm
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
BehaviorExecutionSpecification newElement = UMLFactory.eINSTANCE.createBehaviorExecutionSpecification();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
index a53e909e9d8..40bde3d8c77 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragment2CreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CombinedFragment2CreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CombinedFragment2CreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject) {
+ public CombinedFragment2CreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CombinedFragment2CreateCommand(req, eObject);
+ public static CombinedFragment2CreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CombinedFragment2CreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CombinedFragment2CreateCommand(CreateElementRequest req) {
+ public CombinedFragment2CreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CombinedFragment2CreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
+ return data.isPermitted();
}
/**
@@ -100,8 +107,19 @@ public class CombinedFragment2CreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CombinedFragment_3018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
index 530e1944b05..89e0d665e23 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CombinedFragmentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CombinedFragmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CombinedFragmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CombinedFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CombinedFragmentCreateCommand(req, eObject);
+ public static CombinedFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CombinedFragmentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CombinedFragmentCreateCommand(CreateElementRequest req) {
+ public CombinedFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +95,9 @@ public class CombinedFragmentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getCombinedFragment());
+ return data.isPermitted();
}
/**
@@ -101,8 +108,19 @@ public class CombinedFragmentCreateCommand extends EditElementCommand {
@SuppressWarnings("unchecked")
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
CombinedFragment newElement = UMLFactory.eINSTANCE.createCombinedFragment();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_CombinedFragment_3004(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
index 9934877c5f3..0a283d990ff 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/CommentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3009(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
index 02af5a78ee8..6bc342886bb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConsiderIgnoreFragmentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.ConsiderIgnoreFragment;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConsiderIgnoreFragmentCreateCommand(req, eObject);
+ public static ConsiderIgnoreFragmentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConsiderIgnoreFragmentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req) {
+ public ConsiderIgnoreFragmentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +95,9 @@ public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConsiderIgnoreFragment());
+ return data.isPermitted();
}
/**
@@ -101,8 +108,19 @@ public class ConsiderIgnoreFragmentCreateCommand extends EditElementCommand {
@SuppressWarnings("unchecked")
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ConsiderIgnoreFragment newElement = UMLFactory.eINSTANCE.createConsiderIgnoreFragment();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ConsiderIgnoreFragment_3007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
index 5868a34930f..19314dc2af7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ConstraintCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3008(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
index 3f0928353f9..58052e7ed05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/ContinuationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Continuation;
import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ContinuationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ContinuationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ContinuationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ContinuationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ContinuationCreateCommand(req, eObject);
+ public static ContinuationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ContinuationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ContinuationCreateCommand(CreateElementRequest req) {
+ public ContinuationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ContinuationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getContinuation());
+ return data.isPermitted();
}
/**
@@ -98,8 +105,19 @@ public class ContinuationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Continuation newElement = UMLFactory.eINSTANCE.createContinuation();
- InteractionOperand owner = (InteractionOperand)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InteractionOperand qualifiedTarget = (InteractionOperand)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Continuation_3016(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
index 64be8d01d1b..86f3dd6385b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DestructionOccurrenceSpecificationCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,7 +29,7 @@ public class DestructionOccurrenceSpecificationCreateCommand extends EditElement
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -35,24 +39,25 @@ public class DestructionOccurrenceSpecificationCreateCommand extends EditElement
/**
* @generated
*/
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DestructionOccurrenceSpecificationCreateCommand(req, eObject);
+ public static DestructionOccurrenceSpecificationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DestructionOccurrenceSpecificationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req) {
+ public DestructionOccurrenceSpecificationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -77,7 +82,9 @@ public class DestructionOccurrenceSpecificationCreateCommand extends EditElement
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
+ return data.isPermitted();
}
/**
@@ -85,8 +92,19 @@ public class DestructionOccurrenceSpecificationCreateCommand extends EditElement
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DestructionOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DestructionOccurrenceSpecification_3022(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
index e3d0f93a879..e6fa027b189 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintCreateCommand(req, eObject);
+ public static DurationConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintCreateCommand(CreateElementRequest req) {
+ public DurationConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DurationConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_3021(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
index 162905fd3e7..49b831c4d55 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationConstraintInMessageCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationConstraintInMessageCreateCommand extends EditElementCommand
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationConstraintInMessageCreateCommand extends EditElementCommand
/**
* @generated
*/
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationConstraintInMessageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationConstraintInMessageCreateCommand(req, eObject);
+ public static DurationConstraintInMessageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintInMessageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintInMessageCreateCommand(CreateElementRequest req) {
+ public DurationConstraintInMessageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DurationConstraintInMessageCreateCommand extends EditElementCommand
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DurationConstraintInMessageCreateCommand extends EditElementCommand
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationConstraint_3023(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
index 59d5b0b10c8..b0b4c95e7d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/DurationObservationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class DurationObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DurationObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DurationObservationCreateCommand(req, eObject);
+ public static DurationObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationObservationCreateCommand(CreateElementRequest req) {
+ public DurationObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class DurationObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class DurationObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_DurationObservation_3024(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
index fd1c5128a9d..b72ab7a1611 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionCreateCommand(req, eObject);
+ public static InteractionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCreateCommand(CreateElementRequest req) {
+ public InteractionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class InteractionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class InteractionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Interaction_2001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
index a2049e35297..ecf8d1819c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionOperandCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.CombinedFragment;
import org.eclipse.uml2.uml.InteractionOperand;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class InteractionOperandCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class InteractionOperandCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionOperandCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionOperandCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionOperandCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionOperandCreateCommand(req, eObject);
+ public static InteractionOperandCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionOperandCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionOperandCreateCommand(CreateElementRequest req) {
+ public InteractionOperandCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class InteractionOperandCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionOperand());
+ return data.isPermitted();
}
/**
@@ -98,8 +105,19 @@ public class InteractionOperandCreateCommand extends EditElementCommand {
@SuppressWarnings({ "unchecked" })
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InteractionOperand newElement = UMLFactory.eINSTANCE.createInteractionOperand();
- CombinedFragment owner = (CombinedFragment)getElementToEdit();
- owner.getOperands().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ CombinedFragment qualifiedTarget = (CombinedFragment)target;
+ qualifiedTarget.getOperands().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
index 1f39392c82f..5227bb793f8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/InteractionUseCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.InteractionUse;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class InteractionUseCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class InteractionUseCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InteractionUseCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InteractionUseCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionUseCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InteractionUseCreateCommand(req, eObject);
+ public static InteractionUseCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionUseCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionUseCreateCommand(CreateElementRequest req) {
+ public InteractionUseCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +95,9 @@ public class InteractionUseCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteractionUse());
+ return data.isPermitted();
}
/**
@@ -100,8 +107,19 @@ public class InteractionUseCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
InteractionUse newElement = UMLFactory.eINSTANCE.createInteractionUse();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_InteractionUse_3002(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
index 293310dddd5..17a81a96219 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/LifelineCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class LifelineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class LifelineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LifelineCreateCommand(CreateElementRequest req, EObject eObject) {
+ public LifelineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LifelineCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new LifelineCreateCommand(req, eObject);
+ public static LifelineCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LifelineCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LifelineCreateCommand(CreateElementRequest req) {
+ public LifelineCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -90,7 +95,9 @@ public class LifelineCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
}
/**
@@ -100,8 +107,19 @@ public class LifelineCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getLifelines().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getLifelines().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Lifeline_3001(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
index b1a066f49c6..dd427a5c91e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/StateInvariantCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.StateInvariant;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class StateInvariantCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class StateInvariantCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public StateInvariantCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StateInvariantCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static StateInvariantCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StateInvariantCreateCommand(req, eObject);
+ public static StateInvariantCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateInvariantCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StateInvariantCreateCommand(CreateElementRequest req) {
+ public StateInvariantCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class StateInvariantCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateInvariant());
+ return data.isPermitted();
}
/**
@@ -98,8 +105,19 @@ public class StateInvariantCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
- Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StateInvariant_3017(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
index a5525403a4a..1d2c0f726e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeConstraintCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeConstraintCreateCommand(req, eObject);
+ public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintCreateCommand(CreateElementRequest req) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeConstraint_3019(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
index d5b489d5f68..4c1553279d3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/commands/TimeObservationCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.sequence.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeObservation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject) {
+ public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new TimeObservationCreateCommand(req, eObject);
+ public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeObservationCreateCommand(CreateElementRequest req) {
+ public TimeObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class TimeObservationCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class TimeObservationCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_TimeObservation_3020(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
index d91fbfdf627..1a0e5cc82c6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionOperandCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -59,7 +60,7 @@ public class CombinedFragmentCombinedFragmentCompartmentItemSemanticEditPolicy e
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionOperandCreateCommand(req));
+ return getGEFWrapper(new InteractionOperandCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
index 6e082733392..9f33dcfac6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionInteractionCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ConsiderIgnoreFragmentCreateCommand;
@@ -62,37 +63,37 @@ public class InteractionInteractionCompartmentItemSemanticEditPolicy extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Lifeline_3001 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new LifelineCreateCommand(req));
+ return getGEFWrapper(new LifelineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.InteractionUse_3002 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionUseCreateCommand(req));
+ return getGEFWrapper(new InteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3008 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3009 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
index fba2221a2ba..f6a8f798579 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CommentAnnotatedElementCreateCommand;
@@ -98,13 +99,13 @@ public class InteractionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintInMessageCreateCommand(req));
+ return getGEFWrapper(new DurationConstraintInMessageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_3024 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommand(req));
+ return getGEFWrapper(new DurationObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
index 8658fcbef54..19714399164 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/InteractionOperandItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.CombinedFragmentCreateCommand;
@@ -100,25 +101,25 @@ public class InteractionOperandItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionUseCreateCommand(req));
+ return getGEFWrapper(new InteractionUseCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConsiderIgnoreFragment_3007 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req));
+ return getGEFWrapper(new ConsiderIgnoreFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3004 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CombinedFragmentCreateCommand(req));
+ return getGEFWrapper(new CombinedFragmentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Continuation_3016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ContinuationCreateCommand(req));
+ return getGEFWrapper(new ContinuationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
index 13d7bf6b443..ef6a41be44e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/LifelineItemSemanticEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.ActionExecutionSpecificationCreateCommand;
@@ -104,49 +105,49 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActionExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new ActionExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.BehaviorExecutionSpecification_3003 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new BehaviorExecutionSpecificationCreateCommand(req));
+ return getGEFWrapper(new BehaviorExecutionSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.StateInvariant_3017 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateInvariantCreateCommand(req));
+ return getGEFWrapper(new StateInvariantCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.CombinedFragment_3018 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CombinedFragment2CreateCommand(req));
+ return getGEFWrapper(new CombinedFragment2CreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_3019 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_3020 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_3021 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommand(req));
+ return getGEFWrapper(new DurationConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_3022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommand(req));
+ return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
index 7743d315358..a04522811ab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/PackageItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.sequence.edit.commands.InteractionCreateCommand;
import org.eclipse.papyrus.uml.diagram.sequence.providers.UMLElementTypes;
@@ -62,7 +63,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCreateCommand(req));
+ return getGEFWrapper(new InteractionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
index 9ddbddfb147..05ae3190680 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/part/UMLVisualIDRegistry.java
@@ -164,13 +164,7 @@ public class UMLVisualIDRegistry {
* @generated
*/
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return PackageEditPart.VISUAL_ID;
- }
- return -1;
+ return PackageEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
index cdf2ff5533b..f7c7333e33f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF
@@ -77,14 +77,13 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.emf.validation.ocl;visibility:=reexport,
org.eclipse.gef,
org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Ant-Version: Apache Ant 1.7.0
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.part.UM
- LDiagramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine;sing
- leton:=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.statemachine.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.statemachine; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramWithNavigationHandler.java
deleted file mode 100644
index 015e24097b8..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/CreateStateMachineDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.statemachine;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-
-public class CreateStateMachineDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateStateMachineDiagramWithNavigationHandler() {
- super(new CreateStateMachineDiagramCommand(), new StateMachineDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/StateMachineDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/StateMachineDiagramCreationCondition.java
index 122cae35937..45ad2050f3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/StateMachineDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/StateMachineDiagramCreationCondition.java
@@ -12,7 +12,6 @@ package org.eclipse.papyrus.uml.diagram.statemachine;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.infra.core.extension.commands.PerspectiveContextDependence;
-import org.eclipse.uml2.uml.StateMachine;
/**
* StateMachineDiagramCreationCondition class allows to check if a State Machine
@@ -24,10 +23,6 @@ public class StateMachineDiagramCreationCondition extends PerspectiveContextDepe
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- // TODO : to specify according to the spec
- return selectedElement instanceof StateMachine;
- }
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomConnectionPointReferenceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomConnectionPointReferenceCreateCommand.java
index 4c208a9571c..31f7f6a6ba8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomConnectionPointReferenceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomConnectionPointReferenceCreateCommand.java
@@ -1,14 +1,15 @@
package org.eclipse.papyrus.uml.diagram.statemachine.custom.commands;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.ConnectionPointReferenceCreateCommand;
import org.eclipse.uml2.uml.State;
public class CustomConnectionPointReferenceCreateCommand extends ConnectionPointReferenceCreateCommand {
- public CustomConnectionPointReferenceCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomConnectionPointReferenceCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateEntryPointCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateEntryPointCreateCommand.java
index f8d564520d5..609ed0652c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateEntryPointCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateEntryPointCreateCommand.java
@@ -5,6 +5,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.PseudostateEntryPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
@@ -14,8 +15,8 @@ import org.eclipse.uml2.uml.UMLFactory;
public class CustomPseudostateEntryPointCreateCommand extends PseudostateEntryPointCreateCommand {
- public CustomPseudostateEntryPointCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomPseudostateEntryPointCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateExitPointCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateExitPointCreateCommand.java
index efa0c40a6c0..1db596f8d40 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateExitPointCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/commands/CustomPseudostateExitPointCreateCommand.java
@@ -5,6 +5,7 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.PseudostateExitPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
@@ -14,8 +15,8 @@ import org.eclipse.uml2.uml.UMLFactory;
public class CustomPseudostateExitPointCreateCommand extends PseudostateExitPointCreateCommand {
- public CustomPseudostateExitPointCreateCommand(CreateElementRequest req) {
- super(req);
+ public CustomPseudostateExitPointCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req, diagram);
// TODO Auto-generated constructor stub
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java
index 48ecbebd807..5894f7fcf09 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java
@@ -3,6 +3,7 @@ package org.eclipse.papyrus.uml.diagram.statemachine.custom.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomConnectionPointReferenceCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomPseudostateEntryPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomPseudostateExitPointCreateCommand;
@@ -17,13 +18,13 @@ public class CustomStateItemSemanticEditPolicy extends StateItemSemanticEditPoli
@Override
protected Command getCreateCommand(CreateElementRequest req) {
if(UMLElementTypes.Pseudostate_16000 == req.getElementType()) {
- return getGEFWrapper(new CustomPseudostateEntryPointCreateCommand(req));
+ return getGEFWrapper(new CustomPseudostateEntryPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_17000 == req.getElementType()) {
- return getGEFWrapper(new CustomPseudostateExitPointCreateCommand(req));
+ return getGEFWrapper(new CustomPseudostateExitPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectionPointReference_18000 == req.getElementType()) {
- return getGEFWrapper(new CustomConnectionPointReferenceCreateCommand(req));
+ return getGEFWrapper(new CustomConnectionPointReferenceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
index 4a55c8929cb..082b8319cf3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/plugin.xml
@@ -701,59 +701,9 @@
description="Create a new StateMachine Diagram"
categoryId="org.eclipse.papyrus.editor.category"/>
</extension>
-
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.statemachine.CreateStateMachineDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.statemachine.CreationCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor" />
- </with>
- </activeWhen>
- </handler>
- </extension>
-
-<!-- Diagram creation command registration in menu and toolbar -->
-<extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams" label="Diagrams">
- <command commandId="org.eclipse.papyrus.uml.diagram.statemachine.CreationCommand"
- icon="icons/obj16/Diagram_StateMachine.gif" label="Create a new StateMachine Diagram"
- style="push" tooltip="Create a new StateMachine Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command commandId="org.eclipse.papyrus.uml.diagram.statemachine.CreationCommand"
- icon="icons/obj16/Diagram_StateMachine.gif" label="Create a new StateMachine Diagram"
- style="push" tooltip="Create a new StateMachine Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.statemachine.CreationCommand"
- icon="icons/obj16/Diagram_StateMachine.gif"
- label="Create a new StateMachine Diagram"
- style="push"
- tooltip="Create a new StateMachine Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
-</extension>
+<!-- Diagram creation command registration in menu and toolbar -->
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/CommentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/CommentCreateCommand.java
index 40b757b79b2..66284e9b855 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/CommentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/CommentCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,7 +29,7 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -35,24 +39,25 @@ public class CommentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommand(req, eObject);
+ public static CommentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommand(CreateElementRequest req) {
+ public CommentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -75,7 +80,9 @@ public class CommentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -83,8 +90,19 @@ public class CommentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_666(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConnectionPointReferenceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConnectionPointReferenceCreateCommand.java
index 3f3285e7765..8ca8b5a2a95 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConnectionPointReferenceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConnectionPointReferenceCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.ConnectionPointReference;
import org.eclipse.uml2.uml.State;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class ConnectionPointReferenceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static ConnectionPointReferenceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConnectionPointReferenceCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public ConnectionPointReferenceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public ConnectionPointReferenceCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static ConnectionPointReferenceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConnectionPointReferenceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConnectionPointReferenceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConnectionPointReferenceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConnectionPointReference());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class ConnectionPointReferenceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ConnectionPointReference newElement = UMLFactory.eINSTANCE.createConnectionPointReference();
- State owner = (State)getElementToEdit();
- owner.getConnections().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ State qualifiedTarget = (State)target;
+ qualifiedTarget.getConnections().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ConnectionPointReference_18000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConstraintCreateCommand.java
index 972c11d6f6b..e77e7c65472 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ConstraintCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,7 +29,7 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -35,24 +39,25 @@ public class ConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommand(req, eObject);
+ public static ConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommand(CreateElementRequest req) {
+ public ConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -75,7 +80,9 @@ public class ConstraintCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -83,8 +90,19 @@ public class ConstraintCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_668(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/DoActivityStateBehaviorStateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/DoActivityStateBehaviorStateCreateCommand.java
index c37994415ec..36b520baba5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/DoActivityStateBehaviorStateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/DoActivityStateBehaviorStateCreateCommand.java
@@ -11,9 +11,13 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -23,7 +27,7 @@ public class DoActivityStateBehaviorStateCreateCommand extends EditElementComman
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -33,24 +37,25 @@ public class DoActivityStateBehaviorStateCreateCommand extends EditElementComman
/**
* @generated
*/
- public DoActivityStateBehaviorStateCreateCommand(CreateElementRequest req, EObject eObject) {
+ public DoActivityStateBehaviorStateCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DoActivityStateBehaviorStateCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new DoActivityStateBehaviorStateCreateCommand(req, eObject);
+ public static DoActivityStateBehaviorStateCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DoActivityStateBehaviorStateCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public DoActivityStateBehaviorStateCreateCommand(CreateElementRequest req) {
+ public DoActivityStateBehaviorStateCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -77,7 +82,9 @@ public class DoActivityStateBehaviorStateCreateCommand extends EditElementComman
if(container.getDoActivity() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehavior());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/EntryStateBehaviorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/EntryStateBehaviorCreateCommand.java
index 7b6c5ccde88..7ca96dd1844 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/EntryStateBehaviorCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/EntryStateBehaviorCreateCommand.java
@@ -11,9 +11,13 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -23,7 +27,7 @@ public class EntryStateBehaviorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -33,24 +37,25 @@ public class EntryStateBehaviorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public EntryStateBehaviorCreateCommand(CreateElementRequest req, EObject eObject) {
+ public EntryStateBehaviorCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static EntryStateBehaviorCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new EntryStateBehaviorCreateCommand(req, eObject);
+ public static EntryStateBehaviorCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new EntryStateBehaviorCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public EntryStateBehaviorCreateCommand(CreateElementRequest req) {
+ public EntryStateBehaviorCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -77,7 +82,9 @@ public class EntryStateBehaviorCreateCommand extends EditElementCommand {
if(container.getEntry() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehavior());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ExitStateBehaviorCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ExitStateBehaviorCreateCommand.java
index 4e0913ee906..f76c63dd0a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ExitStateBehaviorCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/ExitStateBehaviorCreateCommand.java
@@ -11,9 +11,13 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -23,7 +27,7 @@ public class ExitStateBehaviorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -33,24 +37,25 @@ public class ExitStateBehaviorCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExitStateBehaviorCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExitStateBehaviorCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExitStateBehaviorCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExitStateBehaviorCreateCommand(req, eObject);
+ public static ExitStateBehaviorCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExitStateBehaviorCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExitStateBehaviorCreateCommand(CreateElementRequest req) {
+ public ExitStateBehaviorCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -77,7 +82,9 @@ public class ExitStateBehaviorCreateCommand extends EditElementCommand {
if(container.getExit() != null) {
return false;
}
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getBehavior());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/FinalStateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/FinalStateCreateCommand.java
index 086703c80da..18439fdc143 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/FinalStateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/FinalStateCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.FinalState;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class FinalStateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static FinalStateCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new FinalStateCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public FinalStateCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public FinalStateCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static FinalStateCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FinalStateCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public FinalStateCreateCommand(CreateElementRequest req, EObject eObject) {
+ public FinalStateCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getFinalState());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class FinalStateCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
FinalState newElement = UMLFactory.eINSTANCE.createFinalState();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_FinalState_5000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/InternalTransitionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/InternalTransitionCreateCommand.java
index 91312217b2b..ef97ce961a6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/InternalTransitionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/InternalTransitionCreateCommand.java
@@ -11,10 +11,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Transition;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.Vertex;
/**
@@ -25,7 +29,7 @@ public class InternalTransitionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -35,24 +39,25 @@ public class InternalTransitionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public InternalTransitionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public InternalTransitionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InternalTransitionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new InternalTransitionCreateCommand(req, eObject);
+ public static InternalTransitionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InternalTransitionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public InternalTransitionCreateCommand(CreateElementRequest req) {
+ public InternalTransitionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -75,7 +80,9 @@ public class InternalTransitionCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTransition());
+ return data.isPermitted();
}
/**
@@ -83,8 +90,19 @@ public class InternalTransitionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Transition newElement = UMLFactory.eINSTANCE.createTransition();
- Vertex owner = (Vertex)getElementToEdit();
- owner.getIncomings().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Vertex qualifiedTarget = (Vertex)target;
+ qualifiedTarget.getIncomings().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Transition_680(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateChoiceCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateChoiceCreateCommand.java
index ae5bed0ac72..e4335fd6140 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateChoiceCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateChoiceCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateChoiceCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateChoiceCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateChoiceCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateChoiceCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateChoiceCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateChoiceCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateChoiceCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateChoiceCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateChoiceCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateChoiceCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_11000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateDeepHistoryCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateDeepHistoryCreateCommand.java
index 3b8bd7c512a..a0a5d9047d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateDeepHistoryCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateDeepHistoryCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateDeepHistoryCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateDeepHistoryCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateDeepHistoryCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateDeepHistoryCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateDeepHistoryCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateDeepHistoryCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateDeepHistoryCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateDeepHistoryCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateDeepHistoryCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateDeepHistoryCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_14000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateEntryPointCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateEntryPointCreateCommand.java
index bec620e4a80..49861f0d81b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateEntryPointCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateEntryPointCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateEntryPointCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateEntryPointCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateEntryPointCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateEntryPointCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateEntryPointCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateEntryPointCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateEntryPointCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateEntryPointCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateEntryPointCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateEntryPointCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- StateMachine owner = (StateMachine)getElementToEdit();
- owner.getConnectionPoints().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StateMachine qualifiedTarget = (StateMachine)target;
+ qualifiedTarget.getConnectionPoints().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_16000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateExitPointCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateExitPointCreateCommand.java
index 301270e0924..1c813d8f96e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateExitPointCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateExitPointCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateExitPointCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateExitPointCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateExitPointCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateExitPointCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateExitPointCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateExitPointCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateExitPointCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateExitPointCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateExitPointCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateExitPointCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- StateMachine owner = (StateMachine)getElementToEdit();
- owner.getConnectionPoints().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StateMachine qualifiedTarget = (StateMachine)target;
+ qualifiedTarget.getConnectionPoints().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_17000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateForkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateForkCreateCommand.java
index f64b46d85de..fba16292b8f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateForkCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateForkCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateForkCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateForkCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateForkCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateForkCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateForkCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateForkCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateForkCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateForkCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateForkCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateForkCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_10000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateInitialCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateInitialCreateCommand.java
index bbdc881d02f..af0ea92d910 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateInitialCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateInitialCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateInitialCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateInitialCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateInitialCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateInitialCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateInitialCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateInitialCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateInitialCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateInitialCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateInitialCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateInitialCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_8000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJoinCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJoinCreateCommand.java
index 60f721fe4c1..d7397669263 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJoinCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJoinCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateJoinCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateJoinCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateJoinCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateJoinCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateJoinCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateJoinCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateJoinCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateJoinCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateJoinCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateJoinCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_9000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJunctionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJunctionCreateCommand.java
index c8c7e1e5b50..0d3f38cf9b0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJunctionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateJunctionCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateJunctionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateJunctionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateJunctionCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateJunctionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateJunctionCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateJunctionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateJunctionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateJunctionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateJunctionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateJunctionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_12000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateShallowHistoryCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateShallowHistoryCreateCommand.java
index 57c93616fe2..8323d82a595 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateShallowHistoryCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateShallowHistoryCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateShallowHistoryCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateShallowHistoryCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateShallowHistoryCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateShallowHistoryCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateShallowHistoryCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateShallowHistoryCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateShallowHistoryCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateShallowHistoryCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateShallowHistoryCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateShallowHistoryCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_13000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateTerminateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateTerminateCreateCommand.java
index 708aa91bca7..1b8b8543983 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateTerminateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/PseudostateTerminateCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Pseudostate;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class PseudostateTerminateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static PseudostateTerminateCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new PseudostateTerminateCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public PseudostateTerminateCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public PseudostateTerminateCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static PseudostateTerminateCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PseudostateTerminateCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public PseudostateTerminateCreateCommand(CreateElementRequest req, EObject eObject) {
+ public PseudostateTerminateCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPseudostate());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class PseudostateTerminateCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Pseudostate newElement = UMLFactory.eINSTANCE.createPseudostate();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Pseudostate_15000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/RegionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/RegionCreateCommand.java
index d6788b547b9..2695f5ab4ce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/RegionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/RegionCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class RegionCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static RegionCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new RegionCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public RegionCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public RegionCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static RegionCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new RegionCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public RegionCreateCommand(CreateElementRequest req, EObject eObject) {
+ public RegionCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getRegion());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class RegionCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Region newElement = UMLFactory.eINSTANCE.createRegion();
- StateMachine owner = (StateMachine)getElementToEdit();
- owner.getRegions().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ StateMachine qualifiedTarget = (StateMachine)target;
+ qualifiedTarget.getRegions().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Region_3000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateCreateCommand.java
index fd9528acb8c..2f1d176b101 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.State;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class StateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static StateCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StateCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public StateCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public StateCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static StateCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StateCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StateCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getState());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class StateCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
State newElement = UMLFactory.eINSTANCE.createState();
- Region owner = (Region)getElementToEdit();
- owner.getSubvertices().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Region qualifiedTarget = (Region)target;
+ qualifiedTarget.getSubvertices().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_State_6000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateMachineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateMachineCreateCommand.java
index 86a1bf09d36..2a03cd0cd01 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateMachineCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/StateMachineCreateCommand.java
@@ -11,11 +11,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -25,41 +29,44 @@ public class StateMachineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public static StateMachineCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new StateMachineCreateCommand(req, eObject);
- }
+ private Diagram diagram = null;
/**
* @generated
*/
- private EClass eClass = null;
+ private EObject eObject = null;
/**
* @generated
*/
- private EObject eObject = null;
+ public StateMachineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.eObject = eObject;
+ this.diagram = diagram;
+ }
/**
* @generated
*/
- public StateMachineCreateCommand(CreateElementRequest req) {
- super(req.getLabel(), null, req);
+ public static StateMachineCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new StateMachineCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public StateMachineCreateCommand(CreateElementRequest req, EObject eObject) {
+ public StateMachineCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateMachine());
+ return data.isPermitted();
}
/**
@@ -81,8 +88,19 @@ public class StateMachineCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
StateMachine newElement = UMLFactory.eINSTANCE.createStateMachine();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_StateMachine_2000(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionCreateCommand.java
index 3e5966f5a78..db6f5a50736 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionCreateCommand.java
@@ -32,7 +32,7 @@ public class TransitionCreateCommand extends EditElementCommand {
*/
protected Region deduceContainer(EObject source, EObject target) {
// TODO: avoid modification of generated code, problem is that model needs to be changed at many places ...
- return EMFCustomTransitionRetargetContainerCommand.deduceContainer (source, target);
+ return EMFCustomTransitionRetargetContainerCommand.deduceContainer(source, target);
}
/**
@@ -80,9 +80,6 @@ public class TransitionCreateCommand extends EditElementCommand {
if(getContainer() == null) {
return false;
}
- if(!EMFCustomTransitionRetargetContainerCommand.isValid(source, target)) {
- return false;
- }
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canCreateTransition_7000(getContainer(), getSource(), getTarget());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionReorientCommand.java
index 5df3b201cb4..b7d3f70b570 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/commands/TransitionReorientCommand.java
@@ -71,7 +71,7 @@ public class TransitionReorientCommand extends EditElementCommand {
return false;
}
// TODO: avoid modifications here. Not done due to many required changes
- if (!EMFCustomTransitionRetargetContainerCommand.isValid(newEnd, target)) {
+ if(!EMFCustomTransitionRetargetContainerCommand.isValid(newEnd, target)) {
return false;
}
Region container = (Region)getLink().eContainer();
@@ -90,7 +90,7 @@ public class TransitionReorientCommand extends EditElementCommand {
return false;
}
// TODO: avoid modifications here. Not done due to many required changes
- if (!EMFCustomTransitionRetargetContainerCommand.isValid(source, newEnd)) {
+ if(!EMFCustomTransitionRetargetContainerCommand.isValid(source, newEnd)) {
return false;
}
Region container = (Region)getLink().eContainer();
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageCanonicalEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageCanonicalEditPolicy.java
index 9cecdfcce96..5ebc449240f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageCanonicalEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageCanonicalEditPolicy.java
@@ -28,6 +28,7 @@ import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.update.UpdaterLinkDescriptor;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.CommentEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConnectionPointReferenceEditPart;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConstraintEditPart;
@@ -74,7 +75,136 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Collection<UMLLinkDescriptor> collectAllLinks(View view, Map<EObject, View> domain2NotationMap) {
+ private Diagram getDiagram() {
+ return ((View)getHost().getModel()).getDiagram();
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getSourceEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getSource(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private EditPart getTargetEditPart(UpdaterLinkDescriptor descriptor, Domain2Notation domain2NotationMap) {
+ return getEditPart(descriptor.getDestination(), domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ protected final EditPart getHintedEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap, int hintVisualId) {
+ View view = (View)domain2NotationMap.getHinted(domainModelElement, UMLVisualIDRegistry.getType(hintVisualId));
+ if(view != null) {
+ return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @SuppressWarnings("serial")
+ protected static class Domain2Notation extends HashMap<EObject, View> {
+
+ /**
+ * @generated
+ */
+ public boolean containsDomainElement(EObject domainElement) {
+ return this.containsKey(domainElement);
+ }
+
+ /**
+ * @generated
+ */
+ public View getHinted(EObject domainEObject, String hint) {
+ return this.get(domainEObject);
+ }
+
+ /**
+ * @generated
+ */
+ public void putView(EObject domainElement, View view) {
+ if(!containsKey(view.getElement())) {
+ this.put(domainElement, view);
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected EStructuralFeature getFeatureToSynchronize() {
+ return UMLPackage.eINSTANCE.getPackage_PackagedElement();
+ }
+
+ /**
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ protected List getSemanticChildrenList() {
+ View viewObject = (View)getHost().getModel();
+ LinkedList<EObject> result = new LinkedList<EObject>();
+ List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getPackage_1000SemanticChildren(viewObject);
+ for(UMLNodeDescriptor d : childDescriptors) {
+ result.add(d.getModelElement());
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ private boolean isMyDiagramElement(View view) {
+ return StateMachineEditPart.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
+ return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<IAdaptable> refreshConnections() {
+ Domain2Notation domain2NotationMap = new Domain2Notation();
+ Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
+ Collection existingLinks = new LinkedList(getDiagram().getEdges());
+ for(Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
+ Edge nextDiagramLink = (Edge)linksIterator.next();
+ int diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
+ if(diagramLinkVisualID == -1) {
+ if(nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
+ linksIterator.remove();
+ }
+ continue;
+ }
+ EObject diagramLinkObject = nextDiagramLink.getElement();
+ EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
+ EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
+ for(Iterator<UMLLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
+ UMLLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
+ if(diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
+ linksIterator.remove();
+ linkDescriptorsIterator.remove();
+ break;
+ }
+ }
+ }
+ deleteViews(existingLinks.iterator());
+ return createConnections(linkDescriptors, domain2NotationMap);
+ }
+
+ /**
+ * @generated
+ */
+ private Collection<UMLLinkDescriptor> collectAllLinks(View view, Domain2Notation domain2NotationMap) {
if(!PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view))) {
return Collections.emptyList();
}
@@ -85,9 +215,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPackage_1000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case StateMachineEditPart.VISUAL_ID:
@@ -95,9 +223,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getStateMachine_2000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case RegionEditPart.VISUAL_ID:
@@ -105,9 +231,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getRegion_3000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case FinalStateEditPart.VISUAL_ID:
@@ -115,9 +239,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getFinalState_5000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case StateEditPart.VISUAL_ID:
@@ -125,9 +247,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getState_6000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateInitialEditPart.VISUAL_ID:
@@ -135,9 +255,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_8000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateJoinEditPart.VISUAL_ID:
@@ -145,9 +263,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_9000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateForkEditPart.VISUAL_ID:
@@ -155,9 +271,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_10000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateChoiceEditPart.VISUAL_ID:
@@ -165,9 +279,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_11000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateJunctionEditPart.VISUAL_ID:
@@ -175,9 +287,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_12000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateShallowHistoryEditPart.VISUAL_ID:
@@ -185,9 +295,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_13000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateDeepHistoryEditPart.VISUAL_ID:
@@ -195,9 +303,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_14000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateTerminateEditPart.VISUAL_ID:
@@ -205,9 +311,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_15000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateEntryPointEditPart.VISUAL_ID:
@@ -215,9 +319,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_16000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case PseudostateExitPointEditPart.VISUAL_ID:
@@ -225,9 +327,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getPseudostate_17000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case ConnectionPointReferenceEditPart.VISUAL_ID:
@@ -235,9 +335,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getConnectionPointReference_18000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case CommentEditPart.VISUAL_ID:
@@ -245,9 +343,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getComment_666ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case ConstraintEditPart.VISUAL_ID:
@@ -255,9 +351,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getConstraint_668ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case TransitionEditPart.VISUAL_ID:
@@ -265,9 +359,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getTransition_7000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
case GeneralizationEditPart.VISUAL_ID:
@@ -275,9 +367,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
if(!domain2NotationMap.containsKey(view.getElement())) {
result.addAll(UMLDiagramUpdater.getGeneralization_19000ContainedLinks(view));
}
- if(!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- domain2NotationMap.put(view.getElement(), view);
- }
+ domain2NotationMap.putView(view.getElement(), view);
break;
}
}
@@ -293,11 +383,11 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Map<EObject, View> domain2NotationMap) {
+ private Collection<IAdaptable> createConnections(Collection<UMLLinkDescriptor> linkDescriptors, Domain2Notation domain2NotationMap) {
LinkedList<IAdaptable> adapters = new LinkedList<IAdaptable>();
for(UMLLinkDescriptor nextLinkDescriptor : linkDescriptors) {
- EditPart sourceEditPart = getEditPart(nextLinkDescriptor.getSource(), domain2NotationMap);
- EditPart targetEditPart = getEditPart(nextLinkDescriptor.getDestination(), domain2NotationMap);
+ EditPart sourceEditPart = getSourceEditPart(nextLinkDescriptor, domain2NotationMap);
+ EditPart targetEditPart = getTargetEditPart(nextLinkDescriptor, domain2NotationMap);
if(sourceEditPart == null || targetEditPart == null) {
continue;
}
@@ -323,14 +413,7 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- private Diagram getDiagram() {
- return ((View)getHost().getModel()).getDiagram();
- }
-
- /**
- * @generated
- */
- private EditPart getEditPart(EObject domainModelElement, Map<EObject, View> domain2NotationMap) {
+ private EditPart getEditPart(EObject domainModelElement, Domain2Notation domain2NotationMap) {
View view = (View)domain2NotationMap.get(domainModelElement);
if(view != null) {
return (EditPart)getHost().getViewer().getEditPartRegistry().get(view);
@@ -341,73 +424,6 @@ public class PackageCanonicalEditPolicy extends CanonicalEditPolicy {
/**
* @generated
*/
- protected EStructuralFeature getFeatureToSynchronize() {
- return UMLPackage.eINSTANCE.getPackage_PackagedElement();
- }
-
- /**
- * @generated
- */
- @SuppressWarnings("rawtypes")
- protected List getSemanticChildrenList() {
- View viewObject = (View)getHost().getModel();
- LinkedList<EObject> result = new LinkedList<EObject>();
- List<UMLNodeDescriptor> childDescriptors = UMLDiagramUpdater.getPackage_1000SemanticChildren(viewObject);
- for(UMLNodeDescriptor d : childDescriptors) {
- result.add(d.getModelElement());
- }
- return result;
- }
-
- /**
- * @generated
- */
- private boolean isMyDiagramElement(View view) {
- return StateMachineEditPart.VISUAL_ID == UMLVisualIDRegistry.getVisualID(view);
- }
-
- /**
- * @generated
- */
- protected boolean isOrphaned(Collection<EObject> semanticChildren, final View view) {
- return isMyDiagramElement(view) && !semanticChildren.contains(view.getElement());
- }
-
- /**
- * @generated
- */
- private Collection<IAdaptable> refreshConnections() {
- Map<EObject, View> domain2NotationMap = new HashMap<EObject, View>();
- Collection<UMLLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
- Collection existingLinks = new LinkedList(getDiagram().getEdges());
- for(Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
- Edge nextDiagramLink = (Edge)linksIterator.next();
- int diagramLinkVisualID = UMLVisualIDRegistry.getVisualID(nextDiagramLink);
- if(diagramLinkVisualID == -1) {
- if(nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
- linksIterator.remove();
- }
- continue;
- }
- EObject diagramLinkObject = nextDiagramLink.getElement();
- EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
- EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
- for(Iterator<UMLLinkDescriptor> linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
- UMLLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next();
- if(diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
- linksIterator.remove();
- linkDescriptorsIterator.remove();
- break;
- }
- }
- }
- deleteViews(existingLinks.iterator());
- return createConnections(linkDescriptors, domain2NotationMap);
- }
-
- /**
- * @generated
- */
protected void refreshSemantic() {
if(resolveSemanticElement() == null) {
return;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageItemSemanticEditPolicy.java
index d378c9fcd84..2ae705e7d62 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/PackageItemSemanticEditPolicy.java
@@ -9,6 +9,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.StateMachineCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
@@ -65,7 +66,7 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateMachineCreateCommand(req));
+ return getGEFWrapper(new StateMachineCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionCompartmentItemSemanticEditPolicy.java
index 99f39efba04..60fc6158f41 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionCompartmentItemSemanticEditPolicy.java
@@ -5,6 +5,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.CommentCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.ConstraintCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.FinalStateCreateCommand;
@@ -57,85 +58,85 @@ public class RegionCompartmentItemSemanticEditPolicy extends UMLBaseItemSemantic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateInitialCreateCommand(req));
+ return getGEFWrapper(new PseudostateInitialCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_9000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateJoinCreateCommand(req));
+ return getGEFWrapper(new PseudostateJoinCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_10000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateForkCreateCommand(req));
+ return getGEFWrapper(new PseudostateForkCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_11000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateChoiceCreateCommand(req));
+ return getGEFWrapper(new PseudostateChoiceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_12000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateJunctionCreateCommand(req));
+ return getGEFWrapper(new PseudostateJunctionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_13000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateShallowHistoryCreateCommand(req));
+ return getGEFWrapper(new PseudostateShallowHistoryCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_14000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateDeepHistoryCreateCommand(req));
+ return getGEFWrapper(new PseudostateDeepHistoryCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_15000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateTerminateCreateCommand(req));
+ return getGEFWrapper(new PseudostateTerminateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.FinalState_5000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FinalStateCreateCommand(req));
+ return getGEFWrapper(new FinalStateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.State_6000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new StateCreateCommand(req));
+ return getGEFWrapper(new StateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_16000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateEntryPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateEntryPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_17000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateExitPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateExitPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_666 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommand(req));
+ return getGEFWrapper(new CommentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_668 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommand(req));
+ return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateCompartmentItemSemanticEditPolicy.java
index 7d0e0fd9e59..07d4462a182 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateCompartmentItemSemanticEditPolicy.java
@@ -5,6 +5,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.ConnectionPointReferenceCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.RegionCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
@@ -45,13 +46,13 @@ public class StateCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RegionCreateCommand(req));
+ return getGEFWrapper(new RegionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectionPointReference_18000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConnectionPointReferenceCreateCommand(req));
+ return getGEFWrapper(new ConnectionPointReferenceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
index c1ac4179917..8aded92095b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.ConnectionPointReferenceCreateCommand;
@@ -326,49 +327,49 @@ public class StateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new EntryStateBehaviorCreateCommand(req));
+ return getGEFWrapper(new EntryStateBehaviorCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Behavior_691 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DoActivityStateBehaviorStateCreateCommand(req));
+ return getGEFWrapper(new DoActivityStateBehaviorStateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Behavior_692 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExitStateBehaviorCreateCommand(req));
+ return getGEFWrapper(new ExitStateBehaviorCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Transition_680 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InternalTransitionCreateCommand(req));
+ return getGEFWrapper(new InternalTransitionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Region_3000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RegionCreateCommand(req));
+ return getGEFWrapper(new RegionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_16000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateEntryPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateEntryPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_17000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateExitPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateExitPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConnectionPointReference_18000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConnectionPointReferenceCreateCommand(req));
+ return getGEFWrapper(new ConnectionPointReferenceCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineCompartmentItemSemanticEditPolicy.java
index 805c394cf5c..d5b8a944fe1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineCompartmentItemSemanticEditPolicy.java
@@ -5,6 +5,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.PseudostateEntryPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.PseudostateExitPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.RegionCreateCommand;
@@ -46,19 +47,19 @@ public class StateMachineCompartmentItemSemanticEditPolicy extends UMLBaseItemSe
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new RegionCreateCommand(req));
+ return getGEFWrapper(new RegionCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_16000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateEntryPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateEntryPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_17000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateExitPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateExitPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
index 92e38360e14..ed02b737c16 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateMachineItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.CommentAnnotatedElementCreateCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.CommentAnnotatedElementReorientCommand;
import org.eclipse.papyrus.uml.diagram.statemachine.edit.commands.ConstraintConstrainedElementCreateCommand;
@@ -280,13 +281,13 @@ public class StateMachineItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateEntryPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateEntryPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Pseudostate_17000 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PseudostateExitPointCreateCommand(req));
+ return getGEFWrapper(new PseudostateExitPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
index fed64e09642..461fa0a879a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java
@@ -354,17 +354,8 @@ public class UMLVisualIDRegistry {
return false;
}
- /**
- * @generated
- */
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return PackageEditPart.VISUAL_ID;
- }
- return -1;
+ return PackageEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF
index 3d5e952d06b..6da8da94fb0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF
@@ -67,13 +67,13 @@ Require-Bundle: org.eclipse.emf.ecore,
org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.timing.part.UMLDiagr
- amEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.timing;singleton:
- =true
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.timing.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.timing; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/CreateTimingDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/CreateTimingDiagramWithNavigationHandler.java
deleted file mode 100644
index 8855b26a55b..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/CreateTimingDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.timing.custom;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateTimingDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateTimingDiagramWithNavigationHandler() {
- super(new CreateTimingDiagramCommand(), new TimingDiagramCreationCondition());
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/TimingDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/TimingDiagramCreationCondition.java
index ccb59f22bb9..3e44b6255c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/TimingDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/TimingDiagramCreationCondition.java
@@ -21,14 +21,7 @@ public class TimingDiagramCreationCondition extends PerspectiveContextDependence
*/
@Override
public boolean create(final EObject selectedElement) {
- return true;
-
- // FIXME: condition?
-
- // if (super.create(selectedElement)) {
- // return selectedElement instanceof org.eclipse.uml2.uml.Package;
- // }
- // return false;
+ return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomInteractionCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomInteractionCompartmentItemSemanticEditPolicy.java
index df9eb3059c1..531a0a995b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomInteractionCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomInteractionCompartmentItemSemanticEditPolicy.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.custom.utils.LifelineUtils;
import org.eclipse.papyrus.uml.diagram.timing.custom.utils.LifelineUtils.LifelineType;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.CompactLifelineCreateCommandCN;
@@ -28,7 +29,7 @@ public class CustomInteractionCompartmentItemSemanticEditPolicy extends Interact
protected Command getCreateCommand(final CreateElementRequest req) {
final IElementType elementType = req.getElementType();
if(UMLElementTypes.Lifeline_19 == elementType) {
- return getGEFWrapper(new FullLifelineCreateCommandCN(req) {
+ return getGEFWrapper(new FullLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())) {
@Override
protected void doConfigure(final Lifeline newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
@@ -38,7 +39,7 @@ public class CustomInteractionCompartmentItemSemanticEditPolicy extends Interact
});
}
if(UMLElementTypes.Lifeline_20 == elementType) {
- return getGEFWrapper(new CompactLifelineCreateCommandCN(req) {
+ return getGEFWrapper(new CompactLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())) {
@Override
protected void doConfigure(final Lifeline newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomMessageOccurrenceSpecificationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomMessageOccurrenceSpecificationItemSemanticEditPolicy.java
index 139856ca5e8..a4bbc9181f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomMessageOccurrenceSpecificationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/edit/policies/CustomMessageOccurrenceSpecificationItemSemanticEditPolicy.java
@@ -15,6 +15,7 @@ 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.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.CustomMessageCreateCommand;
import org.eclipse.papyrus.uml.diagram.timing.custom.edit.commands.CustomMessageReorientCommand;
import org.eclipse.papyrus.uml.diagram.timing.custom.utils.MessageUtils;
@@ -41,10 +42,10 @@ public class CustomMessageOccurrenceSpecificationItemSemanticEditPolicy extends
protected Command getCreateCommand(final CreateElementRequest req) {
final IElementType elementType = req.getElementType();
if(UMLElementTypes.TimeConstraint_15 == elementType) {
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_16 == elementType) {
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml
index 23c0703b30e..df0bd7c32a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/plugin.xml
@@ -1226,13 +1226,6 @@
sequence="F5"/>
</extension>
- <extension point="org.eclipse.ui.menus" id="context-menus">
- <?gmfgen generated="true"?>
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=">
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=">
- </menuContribution -->
- </extension>
@@ -1268,17 +1261,6 @@
name="Toggle Time Ruler Visibility"/>
</extension>
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.timing.custom.CreateTimingDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.timing.CreateTimingDiagramCommand">
- <activeWhen>
- <with variable="activeEditorId">
- <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </with>
- </activeWhen>
- </handler>
- </extension>
<extension
point="org.eclipse.ui.bindings"
@@ -1310,50 +1292,8 @@
<extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.timing.CreateTimingDiagramCommand"
- icon="icons/obj16/Diagram_Timing.gif"
- label="Create a new Timing Diagram"
- style="push"
- tooltip="Create a new Timing Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.timing.CreateTimingDiagramCommand"
- icon="icons/obj16/Diagram_Timing.gif"
- label="Create a new Timing Diagram"
- style="push"
- tooltip="Create a new Timing Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.timing.CreateTimingDiagramCommand"
- icon="icons/obj16/Diagram_Timing.gif"
- label="Create a new Timing Diagram"
- style="push"
- tooltip="Create a new Timing Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
<menuContribution locationURI="popup:popup:org.eclipse.ui.popup.any?after=additions">
<command
commandId="org.eclipse.papyrus.uml.diagram.timing.custom.switchLifeline"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java
index aac5ef9e2f3..e2febf3c71d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactLifelineCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CompactLifelineCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public CompactLifelineCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CompactLifelineCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new CompactLifelineCreateCommandCN(req, eObject);
+ public static CompactLifelineCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CompactLifelineCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CompactLifelineCreateCommandCN(final CreateElementRequest req) {
+ public CompactLifelineCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
-
- final Interaction owner = (Interaction)getElementToEdit();
- owner.getLifelines().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getLifelines().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class CompactLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final Lifeline newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Lifeline newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java
index 169baf0cdf8..f4c74291c8a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/CompactStateInvariantCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.StateInvariant;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CompactStateInvariantCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public CompactStateInvariantCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CompactStateInvariantCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new CompactStateInvariantCreateCommandCN(req, eObject);
+ public static CompactStateInvariantCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CompactStateInvariantCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CompactStateInvariantCreateCommandCN(final CreateElementRequest req) {
+ public CompactStateInvariantCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateInvariant());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
-
- final Interaction owner = (Interaction)getElementToEdit();
- owner.getFragments().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFragments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class CompactStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final StateInvariant newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(StateInvariant newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java
index 291358df10b..c603595654b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DestructionOccurrenceSpecificationCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.DestructionOccurrenceSpecification;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
/**
* @generated
*/
- public DestructionOccurrenceSpecificationCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public DestructionOccurrenceSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DestructionOccurrenceSpecificationCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new DestructionOccurrenceSpecificationCreateCommandCN(req, eObject);
+ public static DestructionOccurrenceSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DestructionOccurrenceSpecificationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DestructionOccurrenceSpecificationCreateCommandCN(final CreateElementRequest req) {
+ public DestructionOccurrenceSpecificationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDestructionOccurrenceSpecification());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final DestructionOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
-
- final Lifeline owner = (Lifeline)getElementToEdit();
- owner.getCoveredBys().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DestructionOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createDestructionOccurrenceSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Lifeline qualifiedTarget = (Lifeline)target;
+ qualifiedTarget.getCoveredBys().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class DestructionOccurrenceSpecificationCreateCommandCN extends EditEleme
/**
* @generated
*/
- protected void doConfigure(final DestructionOccurrenceSpecification newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(DestructionOccurrenceSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java
index 1fe8cf4db15..44fd26b3418 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationConstraintCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.DurationConstraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DurationConstraintCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public DurationConstraintCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationConstraintCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new DurationConstraintCreateCommandCN(req, eObject);
+ public static DurationConstraintCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationConstraintCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationConstraintCreateCommandCN(final CreateElementRequest req) {
+ public DurationConstraintCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationConstraint());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
-
- final Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DurationConstraint newElement = UMLFactory.eINSTANCE.createDurationConstraint();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class DurationConstraintCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final DurationConstraint newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(DurationConstraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java
index 60f38663826..8d0fe922d05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/DurationObservationCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.DurationObservation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public DurationObservationCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public DurationObservationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DurationObservationCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new DurationObservationCreateCommandCN(req, eObject);
+ public static DurationObservationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DurationObservationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public DurationObservationCreateCommandCN(final CreateElementRequest req) {
+ public DurationObservationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDurationObservation());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
-
- final Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ DurationObservation newElement = UMLFactory.eINSTANCE.createDurationObservation();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class DurationObservationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final DurationObservation newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(DurationObservation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java
index f78653354c1..72727a3677f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullLifelineCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public FullLifelineCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public FullLifelineCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FullLifelineCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new FullLifelineCreateCommandCN(req, eObject);
+ public static FullLifelineCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FullLifelineCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public FullLifelineCreateCommandCN(final CreateElementRequest req) {
+ public FullLifelineCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
-
- final Interaction owner = (Interaction)getElementToEdit();
- owner.getLifelines().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getLifelines().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class FullLifelineCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final Lifeline newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Lifeline newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java
index 826afe40125..d81c83f8c05 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/FullStateInvariantCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.StateInvariant;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public FullStateInvariantCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public FullStateInvariantCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static FullStateInvariantCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new FullStateInvariantCreateCommandCN(req, eObject);
+ public static FullStateInvariantCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new FullStateInvariantCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public FullStateInvariantCreateCommandCN(final CreateElementRequest req) {
+ public FullStateInvariantCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStateInvariant());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
-
- final Lifeline owner = (Lifeline)getElementToEdit();
- owner.getCoveredBys().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ StateInvariant newElement = UMLFactory.eINSTANCE.createStateInvariant();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Lifeline qualifiedTarget = (Lifeline)target;
+ qualifiedTarget.getCoveredBys().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class FullStateInvariantCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final StateInvariant newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(StateInvariant newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java
index 05e166feb32..08ed60c03c7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GateCreateCommand.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Gate;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class GateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class GateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public GateCreateCommand(final CreateElementRequest req, final EObject eObject) {
+ public GateCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static GateCreateCommand create(final CreateElementRequest req, final EObject eObject) {
- return new GateCreateCommand(req, eObject);
+ public static GateCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new GateCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public GateCreateCommand(final CreateElementRequest req) {
+ public GateCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class GateCreateCommand extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class GateCreateCommand extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class GateCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getGate());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final Gate newElement = UMLFactory.eINSTANCE.createGate();
-
- final Interaction owner = (Interaction)getElementToEdit();
- owner.getFormalGates().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Gate newElement = UMLFactory.eINSTANCE.createGate();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getFormalGates().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class GateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final Gate newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Gate newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java
index c6687a706c4..85109f8e4aa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/GeneralOrderingCreateCommand.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.GeneralOrdering;
import org.eclipse.uml2.uml.InteractionFragment;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public GeneralOrderingCreateCommand(final CreateElementRequest req, final EObject eObject) {
+ public GeneralOrderingCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static GeneralOrderingCreateCommand create(final CreateElementRequest req, final EObject eObject) {
- return new GeneralOrderingCreateCommand(req, eObject);
+ public static GeneralOrderingCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new GeneralOrderingCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public GeneralOrderingCreateCommand(final CreateElementRequest req) {
+ public GeneralOrderingCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getGeneralOrdering());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final GeneralOrdering newElement = UMLFactory.eINSTANCE.createGeneralOrdering();
-
- final InteractionFragment owner = (InteractionFragment)getElementToEdit();
- owner.getGeneralOrderings().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ GeneralOrdering newElement = UMLFactory.eINSTANCE.createGeneralOrdering();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ InteractionFragment qualifiedTarget = (InteractionFragment)target;
+ qualifiedTarget.getGeneralOrderings().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class GeneralOrderingCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final GeneralOrdering newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(GeneralOrdering newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java
index 53d109e7c8d..27ef67539e3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/InteractionCreateCommandTN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class InteractionCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class InteractionCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public InteractionCreateCommandTN(final CreateElementRequest req, final EObject eObject) {
+ public InteractionCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static InteractionCreateCommandTN create(final CreateElementRequest req, final EObject eObject) {
- return new InteractionCreateCommandTN(req, eObject);
+ public static InteractionCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new InteractionCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public InteractionCreateCommandTN(final CreateElementRequest req) {
+ public InteractionCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class InteractionCreateCommandTN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class InteractionCreateCommandTN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class InteractionCreateCommandTN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getInteraction());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
-
- final Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Interaction newElement = UMLFactory.eINSTANCE.createInteraction();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class InteractionCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final Interaction newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Interaction newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java
index a159897c518..889ac8ba3b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/LifelineCreateCommand.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Interaction;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class LifelineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class LifelineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public LifelineCreateCommand(final CreateElementRequest req, final EObject eObject) {
+ public LifelineCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static LifelineCreateCommand create(final CreateElementRequest req, final EObject eObject) {
- return new LifelineCreateCommand(req, eObject);
+ public static LifelineCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new LifelineCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public LifelineCreateCommand(final CreateElementRequest req) {
+ public LifelineCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class LifelineCreateCommand extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class LifelineCreateCommand extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class LifelineCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getLifeline());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
-
- final Interaction owner = (Interaction)getElementToEdit();
- owner.getLifelines().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Lifeline newElement = UMLFactory.eINSTANCE.createLifeline();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Interaction qualifiedTarget = (Interaction)target;
+ qualifiedTarget.getLifelines().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class LifelineCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final Lifeline newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Lifeline newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncCreateCommand.java
index 78589b26a75..59d3139b082 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageAsyncCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageAsyncCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,32 +85,30 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
- final Message newElement = UMLFactory.eINSTANCE.createMessage();
+ Message newElement = UMLFactory.eINSTANCE.createMessage();
getContainer().getMessages().add(newElement);
newElement.setReceiveEvent(getSource());
newElement.setSendEvent(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -120,7 +118,7 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -128,21 +126,21 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -151,7 +149,7 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -162,5 +160,4 @@ public class MessageAsyncCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncReorientCommand.java
index 86356c91650..7d6f32c1b5f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageAsyncReorientCommand.java
@@ -46,11 +46,11 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageAsyncReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageAsyncReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -61,10 +61,10 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -74,14 +74,14 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4(container, getLink(), getNewSource(), target);
}
@@ -89,14 +89,14 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_4(container, getLink(), source, getNewTarget());
}
@@ -104,14 +104,14 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageAsyncReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateCreateCommand.java
index 3d2fa0b3873..55c4303dad2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageCreateCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageCreateCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageCreateCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageCreateCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,32 +85,30 @@ public class MessageCreateCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
- final Message newElement = UMLFactory.eINSTANCE.createMessage();
+ Message newElement = UMLFactory.eINSTANCE.createMessage();
getContainer().getMessages().add(newElement);
newElement.setReceiveEvent(getSource());
newElement.setSendEvent(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -120,7 +118,7 @@ public class MessageCreateCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -128,21 +126,21 @@ public class MessageCreateCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -151,7 +149,7 @@ public class MessageCreateCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -162,5 +160,4 @@ public class MessageCreateCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateReorientCommand.java
index 094de7eaf39..2dd2c8c841d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageCreateReorientCommand.java
@@ -46,11 +46,11 @@ public class MessageCreateReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageCreateReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageCreateReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -61,10 +61,10 @@ public class MessageCreateReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -74,14 +74,14 @@ public class MessageCreateReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_44(container, getLink(), getNewSource(), target);
}
@@ -89,14 +89,14 @@ public class MessageCreateReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_44(container, getLink(), source, getNewTarget());
}
@@ -104,14 +104,14 @@ public class MessageCreateReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageCreateReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteCreateCommand.java
index f12ba33fe1c..d1824bc9452 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageDeleteCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageDeleteCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,32 +85,30 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
- final Message newElement = UMLFactory.eINSTANCE.createMessage();
+ Message newElement = UMLFactory.eINSTANCE.createMessage();
getContainer().getMessages().add(newElement);
newElement.setReceiveEvent(getSource());
newElement.setSendEvent(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -120,7 +118,7 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -128,21 +126,21 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -151,7 +149,7 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -162,5 +160,4 @@ public class MessageDeleteCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteReorientCommand.java
index c9aa11253db..5ac1f0980e6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageDeleteReorientCommand.java
@@ -46,11 +46,11 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageDeleteReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageDeleteReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -61,10 +61,10 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -74,14 +74,14 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_47(container, getLink(), getNewSource(), target);
}
@@ -89,14 +89,14 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_47(container, getLink(), source, getNewTarget());
}
@@ -104,14 +104,14 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageDeleteReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundCreateCommand.java
index cf7fbd5ef33..cdfe7126943 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageFoundCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageFoundCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageFoundCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageFoundCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof Element) {
+ if(source != null && false == source instanceof Element) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,26 +85,24 @@ public class MessageFoundCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -114,7 +112,7 @@ public class MessageFoundCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -122,21 +120,21 @@ public class MessageFoundCreateCommand extends EditElementCommand {
* @generated
*/
protected Element getSource() {
- return (Element)this.source;
+ return (Element)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -145,7 +143,7 @@ public class MessageFoundCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -156,5 +154,4 @@ public class MessageFoundCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundReorientCommand.java
index 7addc368ffc..235759db847 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageFoundReorientCommand.java
@@ -47,11 +47,11 @@ public class MessageFoundReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageFoundReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageFoundReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -62,10 +62,10 @@ public class MessageFoundReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -75,14 +75,14 @@ public class MessageFoundReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof Element && this.newEnd instanceof Element)) {
+ if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_53(container, getLink(), getNewSource(), target);
}
@@ -90,14 +90,14 @@ public class MessageFoundReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final Element source = getLink().getOwner();
+ Element source = getLink().getOwner();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_53(container, getLink(), source, getNewTarget());
}
@@ -105,14 +105,14 @@ public class MessageFoundReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageFoundReorientCommand extends EditElementCommand {
* @generated
*/
protected Element getOldSource() {
- return (Element)this.oldEnd;
+ return (Element)oldEnd;
}
/**
* @generated
*/
protected Element getNewSource() {
- return (Element)this.newEnd;
+ return (Element)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostCreateCommand.java
index 21f904f6631..5b408f51625 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageLostCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageLostCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageLostCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageLostCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof Element) {
+ if(target != null && false == target instanceof Element) {
return false;
}
if(getSource() == null) {
@@ -85,26 +85,24 @@ public class MessageLostCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -114,7 +112,7 @@ public class MessageLostCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -122,21 +120,21 @@ public class MessageLostCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected Element getTarget() {
- return (Element)this.target;
+ return (Element)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -145,7 +143,7 @@ public class MessageLostCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -156,5 +154,4 @@ public class MessageLostCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostReorientCommand.java
index 5e189028828..cd0178a5571 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageLostReorientCommand.java
@@ -47,11 +47,11 @@ public class MessageLostReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageLostReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageLostReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -62,10 +62,10 @@ public class MessageLostReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -75,14 +75,14 @@ public class MessageLostReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final Element target = getLink().getOwner();
+ Element target = getLink().getOwner();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_50(container, getLink(), getNewSource(), target);
}
@@ -90,14 +90,14 @@ public class MessageLostReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof Element && this.newEnd instanceof Element)) {
+ if(!(oldEnd instanceof Element && newEnd instanceof Element)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_50(container, getLink(), source, getNewTarget());
}
@@ -105,14 +105,14 @@ public class MessageLostReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageLostReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected Element getOldTarget() {
- return (Element)this.oldEnd;
+ return (Element)oldEnd;
}
/**
* @generated
*/
protected Element getNewTarget() {
- return (Element)this.newEnd;
+ return (Element)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java
index eef4db153e6..a978a12a420 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageOccurrenceSpecificationCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.MessageOccurrenceSpecification;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
/**
* @generated
*/
- public MessageOccurrenceSpecificationCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public MessageOccurrenceSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static MessageOccurrenceSpecificationCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new MessageOccurrenceSpecificationCreateCommandCN(req, eObject);
+ public static MessageOccurrenceSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new MessageOccurrenceSpecificationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public MessageOccurrenceSpecificationCreateCommandCN(final CreateElementRequest req) {
+ public MessageOccurrenceSpecificationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getMessageOccurrenceSpecification());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final MessageOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
-
- final Lifeline owner = (Lifeline)getElementToEdit();
- owner.getCoveredBys().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ MessageOccurrenceSpecification newElement = UMLFactory.eINSTANCE.createMessageOccurrenceSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Lifeline qualifiedTarget = (Lifeline)target;
+ qualifiedTarget.getCoveredBys().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class MessageOccurrenceSpecificationCreateCommandCN extends EditElementCo
/**
* @generated
*/
- protected void doConfigure(final MessageOccurrenceSpecification newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(MessageOccurrenceSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyCreateCommand.java
index 105df89b331..13b3991b3b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageReplyCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageReplyCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageReplyCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageReplyCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,32 +85,30 @@ public class MessageReplyCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
- final Message newElement = UMLFactory.eINSTANCE.createMessage();
+ Message newElement = UMLFactory.eINSTANCE.createMessage();
getContainer().getMessages().add(newElement);
newElement.setReceiveEvent(getSource());
newElement.setSendEvent(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -120,7 +118,7 @@ public class MessageReplyCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -128,21 +126,21 @@ public class MessageReplyCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -151,7 +149,7 @@ public class MessageReplyCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -162,5 +160,4 @@ public class MessageReplyCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyReorientCommand.java
index 5d46893aa93..18643d8c709 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageReplyReorientCommand.java
@@ -46,11 +46,11 @@ public class MessageReplyReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageReplyReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageReplyReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -61,10 +61,10 @@ public class MessageReplyReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -74,14 +74,14 @@ public class MessageReplyReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_41(container, getLink(), getNewSource(), target);
}
@@ -89,14 +89,14 @@ public class MessageReplyReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_41(container, getLink(), source, getNewTarget());
}
@@ -104,14 +104,14 @@ public class MessageReplyReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageReplyReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncCreateCommand.java
index 53a3e14e881..569bafd41ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncCreateCommand.java
@@ -50,11 +50,11 @@ public class MessageSyncCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageSyncCreateCommand(final CreateRelationshipRequest request, final EObject source, final EObject target) {
+ public MessageSyncCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
- this.container = deduceContainer(source, target);
+ container = deduceContainer(source, target);
}
/**
@@ -62,13 +62,13 @@ public class MessageSyncCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
- if(this.source == null && this.target == null) {
+ if(source == null && target == null) {
return false;
}
- if(this.source != null && false == this.source instanceof MessageEnd) {
+ if(source != null && false == source instanceof MessageEnd) {
return false;
}
- if(this.target != null && false == this.target instanceof MessageEnd) {
+ if(target != null && false == target instanceof MessageEnd) {
return false;
}
if(getSource() == null) {
@@ -85,32 +85,30 @@ public class MessageSyncCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
- final Message newElement = UMLFactory.eINSTANCE.createMessage();
+ Message newElement = UMLFactory.eINSTANCE.createMessage();
getContainer().getMessages().add(newElement);
newElement.setReceiveEvent(getSource());
newElement.setSendEvent(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
* @generated
*/
- protected void doConfigure(final Message newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(Message newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(CreateRelationshipRequest.SOURCE, getSource());
configureRequest.setParameter(CreateRelationshipRequest.TARGET, getTarget());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
@@ -120,7 +118,7 @@ public class MessageSyncCreateCommand extends EditElementCommand {
* @generated
*/
@Override
- protected void setElementToEdit(final EObject element) {
+ protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
@@ -128,21 +126,21 @@ public class MessageSyncCreateCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getSource() {
- return (MessageEnd)this.source;
+ return (MessageEnd)source;
}
/**
* @generated
*/
protected MessageEnd getTarget() {
- return (MessageEnd)this.target;
+ return (MessageEnd)target;
}
/**
* @generated
*/
public Interaction getContainer() {
- return this.container;
+ return container;
}
/**
@@ -151,7 +149,7 @@ public class MessageSyncCreateCommand extends EditElementCommand {
*
* @generated
*/
- protected Interaction deduceContainer(final EObject source, final EObject target) {
+ protected Interaction deduceContainer(EObject source, EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
@@ -162,5 +160,4 @@ public class MessageSyncCreateCommand extends EditElementCommand {
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncReorientCommand.java
index 0b540068711..845d99634ec 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncReorientCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/MessageSyncReorientCommand.java
@@ -46,11 +46,11 @@ public class MessageSyncReorientCommand extends EditElementCommand {
/**
* @generated
*/
- public MessageSyncReorientCommand(final ReorientRelationshipRequest request) {
+ public MessageSyncReorientCommand(ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
- this.reorientDirection = request.getDirection();
- this.oldEnd = request.getOldRelationshipEnd();
- this.newEnd = request.getNewRelationshipEnd();
+ reorientDirection = request.getDirection();
+ oldEnd = request.getOldRelationshipEnd();
+ newEnd = request.getNewRelationshipEnd();
}
/**
@@ -61,10 +61,10 @@ public class MessageSyncReorientCommand extends EditElementCommand {
if(false == getElementToEdit() instanceof Message) {
return false;
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientTarget();
}
return false;
@@ -74,14 +74,14 @@ public class MessageSyncReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientSource() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd target = getLink().getSendEvent();
+ MessageEnd target = getLink().getSendEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_3(container, getLink(), getNewSource(), target);
}
@@ -89,14 +89,14 @@ public class MessageSyncReorientCommand extends EditElementCommand {
* @generated
*/
protected boolean canReorientTarget() {
- if(!(this.oldEnd instanceof MessageEnd && this.newEnd instanceof MessageEnd)) {
+ if(!(oldEnd instanceof MessageEnd && newEnd instanceof MessageEnd)) {
return false;
}
- final MessageEnd source = getLink().getReceiveEvent();
+ MessageEnd source = getLink().getReceiveEvent();
if(!(getLink().eContainer() instanceof Interaction)) {
return false;
}
- final Interaction container = (Interaction)getLink().eContainer();
+ Interaction container = (Interaction)getLink().eContainer();
return UMLBaseItemSemanticEditPolicy.getLinkConstraints().canExistMessage_3(container, getLink(), source, getNewTarget());
}
@@ -104,14 +104,14 @@ public class MessageSyncReorientCommand extends EditElementCommand {
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in reorient link command"); //$NON-NLS-1$
}
- if(this.reorientDirection == ReorientRequest.REORIENT_SOURCE) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
}
- if(this.reorientDirection == ReorientRequest.REORIENT_TARGET) {
+ if(reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return reorientTarget();
}
throw new IllegalStateException();
@@ -144,27 +144,27 @@ public class MessageSyncReorientCommand extends EditElementCommand {
* @generated
*/
protected MessageEnd getOldSource() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewSource() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
/**
* @generated
*/
protected MessageEnd getOldTarget() {
- return (MessageEnd)this.oldEnd;
+ return (MessageEnd)oldEnd;
}
/**
* @generated
*/
protected MessageEnd getNewTarget() {
- return (MessageEnd)this.newEnd;
+ return (MessageEnd)newEnd;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java
index f195ed5984c..4e489cf1e00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/OccurrenceSpecificationCreateCommandCN.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Lifeline;
import org.eclipse.uml2.uml.OccurrenceSpecification;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public OccurrenceSpecificationCreateCommandCN(final CreateElementRequest req, final EObject eObject) {
+ public OccurrenceSpecificationCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static OccurrenceSpecificationCreateCommandCN create(final CreateElementRequest req, final EObject eObject) {
- return new OccurrenceSpecificationCreateCommandCN(req, eObject);
+ public static OccurrenceSpecificationCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new OccurrenceSpecificationCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public OccurrenceSpecificationCreateCommandCN(final CreateElementRequest req) {
+ public OccurrenceSpecificationCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOccurrenceSpecification());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final OccurrenceSpecification newElement = UMLFactory.eINSTANCE.createOccurrenceSpecification();
-
- final Lifeline owner = (Lifeline)getElementToEdit();
- owner.getCoveredBys().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ OccurrenceSpecification newElement = UMLFactory.eINSTANCE.createOccurrenceSpecification();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Lifeline qualifiedTarget = (Lifeline)target;
+ qualifiedTarget.getCoveredBys().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class OccurrenceSpecificationCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final OccurrenceSpecification newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(OccurrenceSpecification newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java
index ea4deda222b..c7aaf9e9588 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeConstraintCreateCommand.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.TimeConstraint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeConstraintCreateCommand(final CreateElementRequest req, final EObject eObject) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeConstraintCreateCommand create(final CreateElementRequest req, final EObject eObject) {
- return new TimeConstraintCreateCommand(req, eObject);
+ public static TimeConstraintCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeConstraintCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeConstraintCreateCommand(final CreateElementRequest req) {
+ public TimeConstraintCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeConstraint());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
-
- final Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ TimeConstraint newElement = UMLFactory.eINSTANCE.createTimeConstraint();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class TimeConstraintCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final TimeConstraint newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(TimeConstraint newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java
index ccfa5cf2276..6e3346163b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/commands/TimeObservationCreateCommand.java
@@ -19,10 +19,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.TimeObservation;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -34,7 +38,7 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -44,24 +48,25 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public TimeObservationCreateCommand(final CreateElementRequest req, final EObject eObject) {
+ public TimeObservationCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static TimeObservationCreateCommand create(final CreateElementRequest req, final EObject eObject) {
- return new TimeObservationCreateCommand(req, eObject);
+ public static TimeObservationCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new TimeObservationCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public TimeObservationCreateCommand(final CreateElementRequest req) {
+ public TimeObservationCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -71,7 +76,6 @@ public class TimeObservationCreateCommand extends EditElementCommand {
*/
@Override
protected EObject getElementToEdit() {
-
EObject container = ((CreateElementRequest)getRequest()).getContainer();
if(container instanceof View) {
container = ((View)container).getElement();
@@ -79,7 +83,7 @@ public class TimeObservationCreateCommand extends EditElementCommand {
if(container != null) {
return container;
}
- return this.eObject;
+ return eObject;
}
/**
@@ -87,24 +91,31 @@ public class TimeObservationCreateCommand extends EditElementCommand {
*/
@Override
public boolean canExecute() {
-
- return true;
-
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getTimeObservation());
+ return data.isPermitted();
}
/**
* @generated
*/
@Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-
- final TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
-
- final Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
-
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ TimeObservation newElement = UMLFactory.eINSTANCE.createTimeObservation();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -112,15 +123,14 @@ public class TimeObservationCreateCommand extends EditElementCommand {
/**
* @generated
*/
- protected void doConfigure(final TimeObservation newElement, final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- final IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
- final ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ protected void doConfigure(TimeObservation newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
- final ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
if(configureCommand != null && configureCommand.canExecute()) {
configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
index b591034abdd..d6b6150cf1c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineCompartmentItemSemanticEditPolicyCN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.CompactStateInvariantCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DestructionOccurrenceSpecificationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationConstraintCreateCommandCN;
@@ -42,8 +43,8 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -54,8 +55,7 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -64,57 +64,56 @@ public class CompactLifelineCompartmentItemSemanticEditPolicyCN extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CompactStateInvariantCreateCommandCN(req));
+ return getGEFWrapper(new CompactStateInvariantCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OccurrenceSpecification_12 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.MessageOccurrenceSpecification_13 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_27 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_18 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_17 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new DurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_15 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_16 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.GeneralOrdering_67 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GeneralOrderingCreateCommand(req));
+ return getGEFWrapper(new GeneralOrderingCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
index 35430e90f2d..d511667691c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class CompactLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemantic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
index 75528f51e37..67674586c5c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class CompactLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
index 34cf94b472e..e6245ba1791 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/CompactStateInvariantItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class CompactStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSe
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
index 54131bcc319..bd48a03cfc1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DestructionOccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -62,13 +62,12 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class DestructionOccurrenceSpecificationItemSemanticEditPolicyCN extends
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
index d1b48b72954..6704305bfd5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationConstraintItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class DurationConstraintItemSemanticEditPolicyCN extends UMLBaseItemSeman
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
index 93cca0e6d66..bb0d2900ab1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/DurationObservationItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class DurationObservationItemSemanticEditPolicyCN extends UMLBaseItemSema
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
index fdbdd05ba22..3492ae2d96c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class FullLifelineItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdi
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
index 340edfbf3fa..e519a13860f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN exte
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class FullLifelineStateDefinitionCompartmentItemSemanticEditPolicyCN exte
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
index 71294a04fc9..7c715eea807 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends UM
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class FullLifelineTimeRulerCompartmentItemSemanticEditPolicyCN extends UM
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
index 8ea077efd8f..6ea609ee11f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullLifelineTimelineCompartmentItemSemanticEditPolicyCN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DestructionOccurrenceSpecificationCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.DurationObservationCreateCommandCN;
@@ -42,8 +43,8 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -54,8 +55,7 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -64,57 +64,56 @@ public class FullLifelineTimelineCompartmentItemSemanticEditPolicyCN extends UML
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FullStateInvariantCreateCommandCN(req));
+ return getGEFWrapper(new FullStateInvariantCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.OccurrenceSpecification_12 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new OccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.MessageOccurrenceSpecification_13 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new MessageOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DestructionOccurrenceSpecification_27 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req));
+ return getGEFWrapper(new DestructionOccurrenceSpecificationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationConstraint_18 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationConstraintCreateCommandCN(req));
+ return getGEFWrapper(new DurationConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.DurationObservation_17 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DurationObservationCreateCommandCN(req));
+ return getGEFWrapper(new DurationObservationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeConstraint_15 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeConstraintCreateCommand(req));
+ return getGEFWrapper(new TimeConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.TimeObservation_16 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new TimeObservationCreateCommand(req));
+ return getGEFWrapper(new TimeObservationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.GeneralOrdering_67 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GeneralOrderingCreateCommand(req));
+ return getGEFWrapper(new GeneralOrderingCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
index 19b2c6a2450..6f17fc0a148 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/FullStateInvariantItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class FullStateInvariantItemSemanticEditPolicyCN extends UMLBaseItemSeman
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
index e190f061e29..c56d2b1a8b6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GateItemSemanticEditPolicy.java
@@ -62,13 +62,12 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class GateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
index ed3cbe1fc87..b48b1468880 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/GeneralOrderingItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class GeneralOrderingItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
index 69ab0662cdd..97657b54fca 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionCompartmentItemSemanticEditPolicyTN.java
@@ -13,6 +13,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.CompactLifelineCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.FullLifelineCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.timing.providers.UMLElementTypes;
@@ -35,8 +36,8 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -47,8 +48,7 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -57,15 +57,14 @@ public class InteractionCompartmentItemSemanticEditPolicyTN extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new FullLifelineCreateCommandCN(req));
+ return getGEFWrapper(new FullLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Lifeline_20 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CompactLifelineCreateCommandCN(req));
+ return getGEFWrapper(new CompactLifelineCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
index 8cac636666b..951e7cbe0fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/InteractionNodeItemSemanticEditPolicyTN.java
@@ -20,6 +20,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.GateCreateCommand;
@@ -49,8 +50,8 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -61,8 +62,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -71,7 +71,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new GateCreateCommand(req));
+ return getGEFWrapper(new GateCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -80,13 +80,12 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -98,16 +97,16 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +117,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -139,8 +137,8 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -151,8 +149,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -176,7 +173,7 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -185,5 +182,4 @@ public class InteractionNodeItemSemanticEditPolicyTN extends UMLBaseItemSemantic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
index 7ae3dc0af57..b220587bea3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/LifelineItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class LifelineItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
index c21cdaac003..8be6b8c5405 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageAsyncItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageAsyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
index 045509d391d..6b5ae8ebec7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageCreateItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageCreateItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
index aa34ce1db35..4a66baa1d11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageDeleteItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageDeleteItemSemanticEditPolicy extends UMLBaseItemSemanticEdit
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
index 545da71153f..b66876f0a6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageFoundItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageFoundItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
index 2db6c1a129c..8122664ee02 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageLostItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageLostItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
index b208e5ef77d..1eb64daf1de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageOccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -62,13 +62,12 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -80,16 +79,16 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -100,8 +99,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -154,8 +152,8 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -166,8 +164,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -224,7 +221,7 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageSyncEditPart.VISUAL_ID:
return getGEFWrapper(new MessageSyncReorientCommand(req));
@@ -243,5 +240,4 @@ public class MessageOccurrenceSpecificationItemSemanticEditPolicyCN extends UMLB
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
index dd1493ea725..9d954226292 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageReplyItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageReplyItemSemanticEditPolicy extends UMLBaseItemSemanticEditP
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
index dd20f687f39..110751085f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/MessageSyncItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class MessageSyncItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
index 96f23dfc1ca..b005705e735 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/OccurrenceSpecificationItemSemanticEditPolicyCN.java
@@ -47,13 +47,12 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class OccurrenceSpecificationItemSemanticEditPolicyCN extends UMLBaseItem
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
index 6a780ca14b0..eb03a240084 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeConstraintItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class TimeConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
index 1efd5463cc4..0bff4374b8b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeObservationItemSemanticEditPolicy.java
@@ -47,13 +47,12 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
- final EObject selectedEObject = req.getElementToDestroy();
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ EObject selectedEObject = req.getElementToDestroy();
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedEObject);
if(provider != null) {
// Retrieve delete command from the Element Edit service
- final ICommand deleteCommand = provider.getEditCommand(req);
-
+ ICommand deleteCommand = provider.getEditCommand(req);
if(deleteCommand != null) {
return new ICommandProxy(deleteCommand);
}
@@ -65,16 +64,16 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
return command != null ? command : super.getCreateRelationshipCommand(req);
}
/**
* @generated
*/
- protected Command getStartCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -85,8 +84,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -106,8 +104,8 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
/**
* @generated
*/
- protected Command getCompleteCreateRelationshipCommand(final CreateRelationshipRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return null;
}
@@ -118,8 +116,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -143,7 +140,7 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
* @generated
*/
@Override
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
switch(getVisualID(req)) {
case MessageLostEditPart.VISUAL_ID:
return getGEFWrapper(new MessageLostReorientCommand(req));
@@ -152,5 +149,4 @@ public class TimeObservationItemSemanticEditPolicy extends UMLBaseItemSemanticEd
}
return super.getReorientRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
index ca41ca53b9d..786d6f8d57a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimeRulerCompartmentItemSemanticEditPolicyCN.java
@@ -33,8 +33,8 @@ public class TimeRulerCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSem
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -45,13 +45,11 @@ public class TimeRulerCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSem
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
}
return super.getCreateCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
index 82de5aedcc9..faf71de7429 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/TimingDiagramEditPartFactoryItemSemanticEditPolicy.java
@@ -17,6 +17,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.timing.edit.commands.InteractionCreateCommandTN;
import org.eclipse.papyrus.uml.diagram.timing.providers.UMLElementTypes;
@@ -39,8 +40,8 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
* @generated
*/
@Override
- protected Command getCreateCommand(final CreateElementRequest req) {
- final IElementType requestElementType = req.getElementType();
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
if(requestElementType == null) {
return super.getCreateCommand(req);
}
@@ -51,8 +52,7 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
if(baseElementType != null) {
isExtendedType = true;
} else {
- // no reference element type ID. using the closest super element type to give more opportunities, but
- // can lead to bugs.
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
isExtendedType = true;
}
@@ -61,7 +61,7 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new InteractionCreateCommandTN(req));
+ return getGEFWrapper(new InteractionCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
@@ -70,8 +70,8 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
* @generated
*/
@Override
- protected Command getDuplicateCommand(final DuplicateElementsRequest req) {
- final TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
Diagram currentDiagram = null;
if(getHost() instanceof IGraphicalEditPart) {
currentDiagram = ((IGraphicalEditPart)getHost()).getNotationView().getDiagram();
@@ -87,15 +87,14 @@ public class TimingDiagramEditPartFactoryItemSemanticEditPolicy extends UMLBaseI
/**
* @generated
*/
- private final Diagram diagram;
+ private Diagram diagram;
/**
* @generated
*/
- public DuplicateAnythingCommand(final TransactionalEditingDomain editingDomain, final DuplicateElementsRequest req, final Diagram currentDiagram) {
+ public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req, Diagram currentDiagram) {
super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap(), currentDiagram);
this.diagram = currentDiagram;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
index 0387a764619..cd6ebf02c73 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLBaseItemSemanticEditPolicy.java
@@ -81,8 +81,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected UMLBaseItemSemanticEditPolicy(final IElementType elementType) {
- this.myElementType = elementType;
+ protected UMLBaseItemSemanticEditPolicy(IElementType elementType) {
+ myElementType = elementType;
}
/**
@@ -96,13 +96,13 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*/
@Override
@SuppressWarnings("unchecked")
- public Command getCommand(final Request request) {
+ public Command getCommand(Request request) {
if(request instanceof ReconnectRequest) {
- final Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
+ Object view = ((ReconnectRequest)request).getConnectionEditPart().getModel();
if(view instanceof View) {
- final Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
+ Integer id = new Integer(UMLVisualIDRegistry.getVisualID((View)view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
- request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, view);
+ request.getExtendedData().put(GRAPHICAL_RECONNECTED_EDGE, (View)view);
}
}
return super.getCommand(request);
@@ -113,8 +113,8 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*
* @generated
*/
- protected int getVisualID(final IEditCommandRequest request) {
- final Object id = request.getParameter(VISUAL_ID_KEY);
+ protected int getVisualID(IEditCommandRequest request) {
+ Object id = request.getParameter(VISUAL_ID_KEY);
return id instanceof Integer ? ((Integer)id).intValue() : -1;
}
@@ -122,12 +122,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
* @generated
*/
@Override
- protected Command getSemanticCommand(final IEditCommandRequest request) {
- final IEditCommandRequest completedRequest = completeRequest(request);
+ protected Command getSemanticCommand(IEditCommandRequest request) {
+ IEditCommandRequest completedRequest = completeRequest(request);
Command semanticCommand = getSemanticCommandSwitch(completedRequest);
semanticCommand = getEditHelperCommand(completedRequest, semanticCommand);
if(completedRequest instanceof DestroyRequest) {
- final DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
+ DestroyRequest destroyRequest = (DestroyRequest)completedRequest;
return shouldProceed(destroyRequest) ? addDeleteViewCommand(semanticCommand, destroyRequest) : null;
}
return semanticCommand;
@@ -136,20 +136,20 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command addDeleteViewCommand(final Command mainCommand, final DestroyRequest completedRequest) {
- final Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
+ protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) {
+ Command deleteViewCommand = getGEFWrapper(new DeleteCommand(getEditingDomain(), (View)getHost().getModel()));
return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
}
/**
* @generated
*/
- private Command getEditHelperCommand(final IEditCommandRequest request, final Command editPolicyCommand) {
+ private Command getEditHelperCommand(IEditCommandRequest request, Command editPolicyCommand) {
if(editPolicyCommand != null) {
- final ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
+ ICommand command = editPolicyCommand instanceof ICommandProxy ? ((ICommandProxy)editPolicyCommand).getICommand() : new CommandProxy(editPolicyCommand);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, command);
}
- final IElementType requestContextElementType = getContextElementType(request);
+ IElementType requestContextElementType = getContextElementType(request);
request.setParameter(GeneratedEditHelperBase.CONTEXT_ELEMENT_TYPE, requestContextElementType);
ICommand command = requestContextElementType.getEditCommand(request);
request.setParameter(GeneratedEditHelperBase.EDIT_POLICY_COMMAND, null);
@@ -166,15 +166,15 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected IElementType getContextElementType(final IEditCommandRequest request) {
- final IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
- return requestContextElementType != null ? requestContextElementType : this.myElementType;
+ protected IElementType getContextElementType(IEditCommandRequest request) {
+ IElementType requestContextElementType = UMLElementTypes.getElementType(getVisualID(request));
+ return requestContextElementType != null ? requestContextElementType : myElementType;
}
/**
* @generated
*/
- protected Command getSemanticCommandSwitch(final IEditCommandRequest req) {
+ protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
if(req instanceof CreateRelationshipRequest) {
return getCreateRelationshipCommand((CreateRelationshipRequest)req);
} else if(req instanceof CreateElementRequest) {
@@ -204,22 +204,22 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getConfigureCommand(final ConfigureRequest req) {
+ protected Command getConfigureCommand(ConfigureRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getCreateRelationshipCommand(final CreateRelationshipRequest req) {
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getCreateCommand(final CreateElementRequest req) {
- // no more usage of the extended types here.
+ protected Command getCreateCommand(CreateElementRequest req) {
+ // no more usage of the extended types here.
return null;
}
@@ -227,39 +227,39 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getExtendedTypeCreationCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
+ protected Command getExtendedTypeCreationCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(request.getContainer());
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
/**
* @generated
*/
- protected Command getExtendedStartCreateRelationshipCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ protected Command getExtendedStartCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
/**
* @generated
*/
- protected Command getExtendedCompleteCreateRelationshipCommand(final CreateElementRequest request, final IExtendedHintedElementType requestElementType) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
+ protected Command getExtendedCompleteCreateRelationshipCommand(CreateElementRequest request, IExtendedHintedElementType requestElementType) {
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(requestElementType);
if(provider == null) {
return UnexecutableCommand.INSTANCE;
}
// Retrieve create command from the Element Edit service
- final ICommand createGMFCommand = provider.getEditCommand(request);
+ ICommand createGMFCommand = provider.getEditCommand(request);
return getGEFWrapper(createGMFCommand);
}
@@ -267,48 +267,47 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- protected Command getSetCommand(final SetRequest req) {
+ protected Command getSetCommand(SetRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getEditContextCommand(final GetEditContextRequest req) {
+ protected Command getEditContextCommand(GetEditContextRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDestroyElementCommand(final DestroyElementRequest req) {
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDestroyReferenceCommand(final DestroyReferenceRequest req) {
+ protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getDuplicateCommand(final DuplicateElementsRequest req) {
+ protected Command getDuplicateCommand(DuplicateElementsRequest req) {
return null;
}
/**
* @generated
*/
- protected Command getMoveCommand(final MoveRequest req) {
-
- final EObject targetCEObject = req.getTargetContainer();
+ protected Command getMoveCommand(MoveRequest req) {
+ EObject targetCEObject = req.getTargetContainer();
if(targetCEObject != null) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(targetCEObject);
if(provider != null) {
- final ICommand moveCommand = provider.getEditCommand(req);
+ ICommand moveCommand = provider.getEditCommand(req);
if(moveCommand != null) {
return new ICommandProxy(moveCommand);
}
@@ -317,27 +316,26 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
} else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
* @generated
*/
- protected Command getReorientReferenceRelationshipCommand(final ReorientReferenceRelationshipRequest req) {
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
/**
* @generated
*/
- protected Command getReorientRelationshipCommand(final ReorientRelationshipRequest req) {
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
return UnexecutableCommand.INSTANCE;
}
/**
* @generated
*/
- protected final Command getGEFWrapper(final ICommand cmd) {
+ protected final Command getGEFWrapper(ICommand cmd) {
return new ICommandProxy(cmd);
}
@@ -355,10 +353,10 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
*
* @generated
*/
- protected void addDestroyShortcutsCommand(final ICompositeCommand cmd, final View view) {
+ protected void addDestroyShortcutsCommand(ICompositeCommand cmd, View view) {
assert view.getEAnnotation("Shortcut") == null; //$NON-NLS-1$
- for(final Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
- final View nextView = (View)it.next();
+ for(Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
+ View nextView = (View)it.next();
if(nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
continue;
}
@@ -392,100 +390,99 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy {
/**
* @generated
*/
- public boolean canCreateMessage_3(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_3(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_3(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_4(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_4(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_4(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_41(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_41(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_41(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_44(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_44(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_44(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_47(final Interaction container, final MessageEnd source, final MessageEnd target) {
+ public boolean canCreateMessage_47(Interaction container, MessageEnd source, MessageEnd target) {
return canExistMessage_47(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_50(final Interaction container, final MessageEnd source, final Element target) {
+ public boolean canCreateMessage_50(Interaction container, MessageEnd source, Element target) {
return canExistMessage_50(container, null, source, target);
}
/**
* @generated
*/
- public boolean canCreateMessage_53(final Interaction container, final Element source, final MessageEnd target) {
+ public boolean canCreateMessage_53(Interaction container, Element source, MessageEnd target) {
return canExistMessage_53(container, null, source, target);
}
/**
* @generated
*/
- public boolean canExistMessage_3(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_3(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_4(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_4(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_41(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_41(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_44(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_44(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_47(final Interaction container, final Message linkInstance, final MessageEnd source, final MessageEnd target) {
+ public boolean canExistMessage_47(Interaction container, Message linkInstance, MessageEnd source, MessageEnd target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_50(final Interaction container, final Message linkInstance, final MessageEnd source, final Element target) {
+ public boolean canExistMessage_50(Interaction container, Message linkInstance, MessageEnd source, Element target) {
return true;
}
/**
* @generated
*/
- public boolean canExistMessage_53(final Interaction container, final Message linkInstance, final Element source, final MessageEnd target) {
+ public boolean canExistMessage_53(Interaction container, Message linkInstance, Element source, MessageEnd target) {
return true;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
index 80bcd5386fd..aa740184aa5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextNonResizableEditPolicy.java
@@ -72,7 +72,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
- addFeedback(this.selectionFeedbackFigure = createSelectionFeedbackFigure());
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
getHostFigure().addFigureListener(getHostPositionListener());
refreshSelectionFeedback();
hideFocus();
@@ -88,10 +88,10 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setSelected(false);
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.selectionFeedbackFigure != null) {
- removeFeedback(this.selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
- this.selectionFeedbackFigure = null;
+ selectionFeedbackFigure = null;
}
hideFocus();
}
@@ -106,7 +106,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
- addFeedback(this.focusFeedbackFigure = createFocusFeedbackFigure());
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
refreshFocusFeedback();
}
}
@@ -119,9 +119,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
if(getHostFigure() instanceof WrappingLabel) {
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.focusFeedbackFigure != null) {
- removeFeedback(this.focusFeedbackFigure);
- this.focusFeedbackFigure = null;
+ if(focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
}
}
}
@@ -147,13 +147,13 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
*/
protected IFigure createSelectionFeedbackFigure() {
if(getHostFigure() instanceof Label) {
- final Label feedbackFigure = new Label();
+ Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
- final RectangleFigure feedbackFigure = new RectangleFigure();
+ RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
@@ -165,8 +165,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
protected IFigure createFocusFeedbackFigure() {
return new Figure() {
- @Override
- protected void paintFigure(final Graphics graphics) {
+ protected void paintFigure(Graphics graphics) {
graphics.drawFocus(getBounds().getResized(-1, -1));
}
};
@@ -175,8 +174,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
/**
* @generated
*/
- protected void updateLabel(final Label target) {
- final Label source = (Label)getHostFigure();
+ protected void updateLabel(Label target) {
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -186,12 +185,12 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshSelectionFeedback() {
- if(this.selectionFeedbackFigure != null) {
- if(this.selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)this.selectionFeedbackFigure);
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
}
}
}
@@ -200,8 +199,8 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
protected void refreshFocusFeedback() {
- if(this.focusFeedbackFigure != null) {
- this.focusFeedbackFigure.setBounds(getFeedbackBounds());
+ if(focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -217,15 +216,15 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
* @generated
*/
private FigureListener getHostPositionListener() {
- if(this.hostPositionListener == null) {
- this.hostPositionListener = new FigureListener() {
+ if(hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
- public void figureMoved(final IFigure source) {
+ public void figureMoved(IFigure source) {
refreshFeedback();
}
};
}
- return this.hostPositionListener;
+ return hostPositionListener;
}
/**
@@ -233,10 +232,9 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl
*/
@Override
protected List createSelectionHandles() {
- final MoveHandle moveHandle = new MoveHandle((GraphicalEditPart)getHost());
+ MoveHandle moveHandle = new MoveHandle((GraphicalEditPart)getHost());
moveHandle.setBorder(null);
moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
index d9f06ea32da..7b2da04390d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/edit/policies/UMLTextSelectionEditPolicy.java
@@ -66,7 +66,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
hideSelection();
- addFeedback(this.selectionFeedbackFigure = createSelectionFeedbackFigure());
+ addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
getHostFigure().addFigureListener(getHostPositionListener());
refreshSelectionFeedback();
hideFocus();
@@ -82,10 +82,10 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setSelected(false);
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.selectionFeedbackFigure != null) {
- removeFeedback(this.selectionFeedbackFigure);
+ if(selectionFeedbackFigure != null) {
+ removeFeedback(selectionFeedbackFigure);
getHostFigure().removeFigureListener(getHostPositionListener());
- this.selectionFeedbackFigure = null;
+ selectionFeedbackFigure = null;
}
hideFocus();
}
@@ -100,7 +100,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
((WrappingLabel)getHostFigure()).setFocus(true);
} else {
hideFocus();
- addFeedback(this.focusFeedbackFigure = createFocusFeedbackFigure());
+ addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
refreshFocusFeedback();
}
}
@@ -113,9 +113,9 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
if(getHostFigure() instanceof WrappingLabel) {
((WrappingLabel)getHostFigure()).setFocus(false);
} else {
- if(this.focusFeedbackFigure != null) {
- removeFeedback(this.focusFeedbackFigure);
- this.focusFeedbackFigure = null;
+ if(focusFeedbackFigure != null) {
+ removeFeedback(focusFeedbackFigure);
+ focusFeedbackFigure = null;
}
}
}
@@ -141,13 +141,13 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
*/
protected IFigure createSelectionFeedbackFigure() {
if(getHostFigure() instanceof Label) {
- final Label feedbackFigure = new Label();
+ Label feedbackFigure = new Label();
feedbackFigure.setOpaque(true);
feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected);
feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected);
return feedbackFigure;
} else {
- final RectangleFigure feedbackFigure = new RectangleFigure();
+ RectangleFigure feedbackFigure = new RectangleFigure();
feedbackFigure.setFill(false);
return feedbackFigure;
}
@@ -159,8 +159,7 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
protected IFigure createFocusFeedbackFigure() {
return new Figure() {
- @Override
- protected void paintFigure(final Graphics graphics) {
+ protected void paintFigure(Graphics graphics) {
graphics.drawFocus(getBounds().getResized(-1, -1));
}
};
@@ -169,8 +168,8 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
/**
* @generated
*/
- protected void updateLabel(final Label target) {
- final Label source = (Label)getHostFigure();
+ protected void updateLabel(Label target) {
+ Label source = (Label)getHostFigure();
target.setText(source.getText());
target.setTextAlignment(source.getTextAlignment());
target.setFont(source.getFont());
@@ -180,12 +179,12 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshSelectionFeedback() {
- if(this.selectionFeedbackFigure != null) {
- if(this.selectionFeedbackFigure instanceof Label) {
- updateLabel((Label)this.selectionFeedbackFigure);
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds());
+ if(selectionFeedbackFigure != null) {
+ if(selectionFeedbackFigure instanceof Label) {
+ updateLabel((Label)selectionFeedbackFigure);
+ selectionFeedbackFigure.setBounds(getFeedbackBounds());
} else {
- this.selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
+ selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5));
}
}
}
@@ -194,8 +193,8 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
protected void refreshFocusFeedback() {
- if(this.focusFeedbackFigure != null) {
- this.focusFeedbackFigure.setBounds(getFeedbackBounds());
+ if(focusFeedbackFigure != null) {
+ focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
@@ -211,15 +210,14 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I
* @generated
*/
private FigureListener getHostPositionListener() {
- if(this.hostPositionListener == null) {
- this.hostPositionListener = new FigureListener() {
+ if(hostPositionListener == null) {
+ hostPositionListener = new FigureListener() {
- public void figureMoved(final IFigure source) {
+ public void figureMoved(IFigure source) {
refreshFeedback();
}
};
}
- return this.hostPositionListener;
+ return hostPositionListener;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/part/UMLVisualIDRegistry.java
index dabf088973a..d497b04f62c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src/org/eclipse/papyrus/uml/diagram/timing/part/UMLVisualIDRegistry.java
@@ -159,17 +159,8 @@ public class UMLVisualIDRegistry {
return Integer.toString(visualID);
}
- /**
- * @generated
- */
public static int getDiagramVisualID(final EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return TimingDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return TimingDiagramEditPart.VISUAL_ID;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
index 46aebfc41a0..546fcb7082d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF
@@ -69,13 +69,12 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.edit;visibility:=reexport,
org.eclipse.gef,
- org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0"
+ org.eclipse.gmf.tooling.runtime;bundle-version="3.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiag
- ramEditorPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase;singleton
- :=true
-
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.part.UMLDiagramEditorPlugin
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/CreateUseCaseDiagramWithNavigationHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/CreateUseCaseDiagramWithNavigationHandler.java
deleted file mode 100644
index c196e9be1bc..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/CreateUseCaseDiagramWithNavigationHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
- *
- * 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:
- * Mathieu Velten (Atos Origin) mathieu.velten@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.usecase;
-
-import org.eclipse.papyrus.infra.gmfdiag.navigation.CreateDiagramWithNavigationHandler;
-
-public class CreateUseCaseDiagramWithNavigationHandler extends CreateDiagramWithNavigationHandler {
-
- public CreateUseCaseDiagramWithNavigationHandler() {
- super(new CreateUseCaseDiagramCommand(), new UseCaseDiagramCreationCondition());
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UseCaseDiagramCreationCondition.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UseCaseDiagramCreationCondition.java
index 7dca91bfb74..d0c215e6ba8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UseCaseDiagramCreationCondition.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UseCaseDiagramCreationCondition.java
@@ -23,9 +23,6 @@ public class UseCaseDiagramCreationCondition extends PerspectiveContextDependenc
* @return whether the diagram can be created.
*/
public boolean create(EObject selectedElement) {
- if(super.create(selectedElement)) {
- return selectedElement instanceof org.eclipse.uml2.uml.Package;
- }
return false;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateAssociationSupplement.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateAssociationSupplement.java
index 73283fc88b3..8eac18e73fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateAssociationSupplement.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateAssociationSupplement.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.common.commands.SupplementCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Association;
@@ -44,8 +45,8 @@ public class CreateAssociationSupplement extends SupplementCommand {
* @param target
* the target of the association (Type)
*/
- public CreateAssociationSupplement(EObject container, EObject source, EObject target) {
- super(container, source, target);
+ public CreateAssociationSupplement(EObject container, EObject source, EObject target, Diagram diagram) {
+ super(container, source, target, diagram);
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateExtensionPointCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateExtensionPointCommand.java
index 6c9e9adfd53..fbbf22541ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateExtensionPointCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/command/CreateExtensionPointCommand.java
@@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCo
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.Node;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
@@ -67,8 +68,8 @@ public class CreateExtensionPointCommand extends Command {
/** adapter to get the extend element */
private IAdaptable adapter;
- public CreateExtensionPointCommand(IHintedType elementType, AbstractEditPart compartmentPart, EObject container, IAdaptable adapter) {
- elementCreationCommand = getElementCreationCommand(container, elementType);
+ public CreateExtensionPointCommand(IHintedType elementType, AbstractEditPart compartmentPart, EObject container, IAdaptable adapter, Diagram diagram) {
+ elementCreationCommand = getElementCreationCommand(container, elementType, diagram);
type = elementType;
compartment = compartmentPart;
containerObject = container;
@@ -84,10 +85,10 @@ public class CreateExtensionPointCommand extends Command {
* the type of the extension point
* @return the command to create model element or null
*/
- private static ICommandProxy getElementCreationCommand(EObject container, IHintedType elementType) {
+ private static ICommandProxy getElementCreationCommand(EObject container, IHintedType elementType, Diagram diagram) {
CreateElementRequest createElementReq = new CreateElementRequest(container, elementType);
if(UMLElementTypes.ExtensionPoint_3007.equals(elementType)) {
- ExtensionPointCreateCommand cmd = new ExtensionPointCreateCommand(createElementReq);
+ ExtensionPointCreateCommand cmd = new ExtensionPointCreateCommand(createElementReq, diagram);
return new ICommandProxy(cmd);
} else {
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CreateExtensionPointEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CreateExtensionPointEditPolicy.java
index 4643ac3ec24..e8e625ac4f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CreateExtensionPointEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CreateExtensionPointEditPolicy.java
@@ -26,6 +26,7 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.command.CreateExtensionPointCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
import org.eclipse.uml2.uml.Extend;
@@ -51,7 +52,7 @@ public class CreateExtensionPointEditPolicy extends GraphicalNodeEditPolicy {
if(targetEP instanceof AbstractEditPart) {
IAdaptable adapter = getExtendViewAdapter(request);
EObject usecase = ViewUtil.resolveSemanticElement((View)getHost().getModel());
- CreateExtensionPointCommand createExtensionPointCommand = new CreateExtensionPointCommand((IHintedType)UMLElementTypes.ExtensionPoint_3007, (AbstractEditPart)targetEP, usecase, adapter);
+ CreateExtensionPointCommand createExtensionPointCommand = new CreateExtensionPointCommand((IHintedType)UMLElementTypes.ExtensionPoint_3007, (AbstractEditPart)targetEP, usecase, adapter, DiagramUtils.getDiagramFrom(getHost()));
compound.add(createExtensionPointCommand);
return compound;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomDefaultNamedElementItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomDefaultNamedElementItemSemanticEditPolicyTN.java
index 4dce914a316..4eac682e624 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomDefaultNamedElementItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomDefaultNamedElementItemSemanticEditPolicyTN.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AssociationCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.GeneralizationCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -35,7 +36,7 @@ public class CustomDefaultNamedElementItemSemanticEditPolicyTN extends DefaultNa
EObject eobject = ((GraphicalEditPart)getHost()).resolveSemanticElement();
if((eobject instanceof Class) || (eobject instanceof Actor) || (eobject instanceof UseCase)) {
if(UMLElementTypes.Association_4011 == req.getElementType()) {
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
}
if((eobject instanceof Class) || (eobject instanceof Actor) || (eobject instanceof UseCase)) {
@@ -51,7 +52,7 @@ public class CustomDefaultNamedElementItemSemanticEditPolicyTN extends DefaultNa
EObject eobject = ((GraphicalEditPart)getHost()).resolveSemanticElement();
if((eobject instanceof Class) || (eobject instanceof Actor) || (eobject instanceof UseCase)) {
if(UMLElementTypes.Association_4011 == req.getElementType()) {
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
}
if((eobject instanceof Class) || (eobject instanceof Actor) || (eobject instanceof UseCase)) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomUseCaseDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomUseCaseDiagramItemSemanticEditPolicy.java
index 00b1efc8fd6..07defde279b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomUseCaseDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/CustomUseCaseDiagramItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.command.CustomSubjectClassifierCreateCommandTN;
@@ -106,7 +107,7 @@ public class CustomUseCaseDiagramItemSemanticEditPolicy extends UseCaseDiagramIt
else if(executableCommandCreation.size() > 1) {
return new ICommandProxy(new CustomSubjectClassifierCreateCommandTN(req, containerElement, executableHTypeCreation));
}
- return getGEFWrapper(new SubjectClassifierCreateCommandTN(req));
+ return getGEFWrapper(new SubjectClassifierCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
index 31d6135b63d..d3ce774b53f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/plugin.xml
@@ -35,75 +35,6 @@
</command>
</extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramWithNavigationHandler"
- commandId="org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramCommand">
- <activeWhen>
- <or>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </or>
- </activeWhen>
- </handler>
- </extension>
-
- <extension
- point="org.eclipse.ui.menus">
-
- <menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramCommand"
- icon="icons/obj16/Diagram_UseCase.gif"
- label="Create a new UseCase Diagram"
- style="push"
- tooltip="Create a new UseCase Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </toolbar>
- </menuContribution>
-
- <menuContribution
- locationURI="menu:org.eclipse.papyrus.ui.menu">
- <menu
- id="org.eclipse.papyrus.uml.diagram.ui.menu.diagrams"
- label="Diagrams">
- <command
- commandId="org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramCommand"
- icon="icons/obj16/Diagram_UseCase.gif"
- label="Create a new UseCase Diagram"
- style="push"
- tooltip="Create a new UseCase Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menu>
- </menuContribution>
-
- <menuContribution locationURI="popup:org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram">
- <command commandId="org.eclipse.papyrus.uml.diagram.usecase.CreateUseCaseDiagramCommand"
- icon="icons/obj16/Diagram_UseCase.gif"
- label="Create a new UseCase Diagram"
- style="push"
- tooltip="Create a new UseCase Diagram">
- <visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
- </visibleWhen>
- </command>
- </menuContribution>
-
- </extension>
<extension
point="org.eclipse.papyrus.infra.core.papyrusDiagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorAsRectangleCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorAsRectangleCreateCommandTN.java
index 80eb23a0f07..b8a8f889b1a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorAsRectangleCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorAsRectangleCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorAsRectangleCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorAsRectangleCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ActorAsRectangleCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ActorAsRectangleCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorAsRectangleCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ActorAsRectangleCreateCommandTN(req, eObject);
+ public static ActorAsRectangleCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorAsRectangleCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorAsRectangleCreateCommandTN(CreateElementRequest req) {
+ public ActorAsRectangleCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActorAsRectangleCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActorAsRectangleCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_2012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorCreateCommandTN.java
index ed89d67ee6c..3ce6ae04db9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ActorCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ActorCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ActorCreateCommandTN(req, eObject);
+ public static ActorCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorCreateCommandTN(CreateElementRequest req) {
+ public ActorCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActorCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActorCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_2011(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInComponentCreateCommand.java
index 20099a043cc..3445db4b8a3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInComponentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActorInComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActorInComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorInComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActorInComponentCreateCommand(req, eObject);
+ public static ActorInComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorInComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorInComponentCreateCommand(CreateElementRequest req) {
+ public ActorInComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActorInComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActorInComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Class owner = (Class)getElementToEdit();
- owner.getNestedClassifiers().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Class qualifiedTarget = (Class)target;
+ qualifiedTarget.getNestedClassifiers().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_3018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInPackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInPackageCreateCommand.java
index 275ae400c10..3569e50a616 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInPackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ActorInPackageCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Actor;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ActorInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ActorInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ActorInPackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ActorInPackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ActorInPackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ActorInPackageCreateCommand(req, eObject);
+ public static ActorInPackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ActorInPackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ActorInPackageCreateCommand(CreateElementRequest req) {
+ public ActorInPackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ActorInPackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getActor());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ActorInPackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Actor newElement = UMLFactory.eINSTANCE.createActor();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Actor_3011(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/AssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/AssociationCreateCommand.java
index 6a27162e911..1b11ba490e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/AssociationCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/AssociationCreateCommand.java
@@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.uml.diagram.usecase.command.CreateAssociationSupplement;
import org.eclipse.papyrus.uml.diagram.usecase.edit.policies.UMLBaseItemSemanticEditPolicy;
import org.eclipse.uml2.uml.Association;
@@ -51,12 +52,18 @@ public class AssociationCreateCommand extends EditElementCommand {
protected Package container;
/**
- * @generated
+ * @generated NOT
+ */
+ protected Diagram diagram;
+
+ /**
+ * @generated NOT
*/
- public AssociationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
+ public AssociationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target, Diagram diagram) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
+ this.diagram = diagram;
container = deduceContainer(source, target);
}
@@ -90,7 +97,7 @@ public class AssociationCreateCommand extends EditElementCommand {
if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
- CreateAssociationSupplement cacs = new CreateAssociationSupplement(container, source, target);
+ CreateAssociationSupplement cacs = new CreateAssociationSupplement(container, source, target, diagram);
Association newElement = (Association)cacs.doDefaultElementCreation(getEditingDomain(), null);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandCN.java
index 406edcd123c..13a8277f876 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandCN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandCN(req, eObject);
+ public static CommentCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandCN(CreateElementRequest req) {
+ public CommentCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_3015(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandTN.java
index 183bf38aae7..759ef34a987 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/CommentCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class CommentCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class CommentCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public CommentCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public CommentCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static CommentCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new CommentCreateCommandTN(req, eObject);
+ public static CommentCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new CommentCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public CommentCreateCommandTN(CreateElementRequest req) {
+ public CommentCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class CommentCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class CommentCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Comment newElement = UMLFactory.eINSTANCE.createComment();
- Element owner = (Element)getElementToEdit();
- owner.getOwnedComments().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Element qualifiedTarget = (Element)target;
+ qualifiedTarget.getOwnedComments().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Comment_2018(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInComponentCreateCommand.java
index ae6dce93394..64edba637c9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInComponentCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class ComponentInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class ComponentInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ComponentInComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ComponentInComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentInComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ComponentInComponentCreateCommand(req, eObject);
+ public static ComponentInComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentInComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentInComponentCreateCommand(CreateElementRequest req) {
+ public ComponentInComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class ComponentInComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class ComponentInComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Component owner = (Component)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Component qualifiedTarget = (Component)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3016(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInPackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInPackageCreateCommand.java
index a72042470e0..ef76dcddcce 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInPackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ComponentInPackageCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Component;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ComponentInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ComponentInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ComponentInPackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ComponentInPackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ComponentInPackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ComponentInPackageCreateCommand(req, eObject);
+ public static ComponentInPackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ComponentInPackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ComponentInPackageCreateCommand(CreateElementRequest req) {
+ public ComponentInPackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ComponentInPackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComponent());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ComponentInPackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Component newElement = UMLFactory.eINSTANCE.createComponent();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Component_3013(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintCreateCommandTN.java
index 8e781084d8f..65096dcd639 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintCreateCommandTN.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public ConstraintCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public ConstraintCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new ConstraintCreateCommandTN(req, eObject);
+ public static ConstraintCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintCreateCommandTN(CreateElementRequest req) {
+ public ConstraintCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_2017(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInComponentCreateCommand.java
index fed2fc9653b..58e0ff6593d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInComponentCreateCommand.java
@@ -24,11 +24,15 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -38,7 +42,7 @@ public class ConstraintInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ConstraintInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintInComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintInComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintInComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintInComponentCreateCommand(req, eObject);
+ public static ConstraintInComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintInComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintInComponentCreateCommand(CreateElementRequest req) {
+ public ConstraintInComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ConstraintInComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ConstraintInComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Namespace owner = (Namespace)getElementToEdit();
- owner.getOwnedRules().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Namespace qualifiedTarget = (Namespace)target;
+ qualifiedTarget.getOwnedRules().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Constraint_3017(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInPackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInPackageCreateCommand.java
index 0ec4c352037..80ecdda285a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInPackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ConstraintInPackageCreateCommand.java
@@ -24,12 +24,16 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -39,7 +43,7 @@ public class ConstraintInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -49,24 +53,25 @@ public class ConstraintInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ConstraintInPackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ConstraintInPackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ConstraintInPackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ConstraintInPackageCreateCommand(req, eObject);
+ public static ConstraintInPackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ConstraintInPackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ConstraintInPackageCreateCommand(CreateElementRequest req) {
+ public ConstraintInPackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -89,7 +94,9 @@ public class ConstraintInPackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
+ return data.isPermitted();
}
/**
@@ -97,8 +104,19 @@ public class ConstraintInPackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Namespace childHolder = (Namespace)getElementToEdit();
childHolder.getOwnedRules().add(newElement);
ElementInitializers.getInstance().init_Constraint_3010(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/DefaultNamedElementCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/DefaultNamedElementCreateCommandTN.java
index c45812b0592..724863ecf11 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/DefaultNamedElementCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/DefaultNamedElementCreateCommandTN.java
@@ -24,8 +24,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -35,7 +39,7 @@ public class DefaultNamedElementCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -45,24 +49,25 @@ public class DefaultNamedElementCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public DefaultNamedElementCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public DefaultNamedElementCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static DefaultNamedElementCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new DefaultNamedElementCreateCommandTN(req, eObject);
+ public static DefaultNamedElementCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new DefaultNamedElementCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public DefaultNamedElementCreateCommandTN(CreateElementRequest req) {
+ public DefaultNamedElementCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -85,7 +90,9 @@ public class DefaultNamedElementCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointCreateCommand.java
index 633bb0ad6e9..35da3a5eabc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExtensionPoint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class ExtensionPointCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ExtensionPointCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExtensionPointCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExtensionPointCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExtensionPointCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExtensionPointCreateCommand(req, eObject);
+ public static ExtensionPointCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExtensionPointCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExtensionPointCreateCommand(CreateElementRequest req) {
+ public ExtensionPointCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ExtensionPointCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExtensionPoint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ExtensionPointCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExtensionPoint newElement = UMLFactory.eINSTANCE.createExtensionPoint();
- UseCase owner = (UseCase)getElementToEdit();
- owner.getExtensionPoints().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ UseCase qualifiedTarget = (UseCase)target;
+ qualifiedTarget.getExtensionPoints().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExtensionPoint_3007(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointInRectangleCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointInRectangleCreateCommand.java
index 81a9a9399f5..dea7540cc37 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointInRectangleCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ExtensionPointInRectangleCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.ExtensionPoint;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class ExtensionPointInRectangleCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class ExtensionPointInRectangleCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ExtensionPointInRectangleCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ExtensionPointInRectangleCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ExtensionPointInRectangleCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ExtensionPointInRectangleCreateCommand(req, eObject);
+ public static ExtensionPointInRectangleCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ExtensionPointInRectangleCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ExtensionPointInRectangleCreateCommand(CreateElementRequest req) {
+ public ExtensionPointInRectangleCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class ExtensionPointInRectangleCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getExtensionPoint());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class ExtensionPointInRectangleCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
ExtensionPoint newElement = UMLFactory.eINSTANCE.createExtensionPoint();
- UseCase owner = (UseCase)getElementToEdit();
- owner.getExtensionPoints().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ UseCase qualifiedTarget = (UseCase)target;
+ qualifiedTarget.getExtensionPoints().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_ExtensionPoint_3008(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandCN.java
index 370a8d30f4f..285276ab837 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandCN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PackageCreateCommandCN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandCN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandCN(req, eObject);
+ public static PackageCreateCommandCN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandCN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandCN(CreateElementRequest req) {
+ public PackageCreateCommandCN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PackageCreateCommandCN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PackageCreateCommandCN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_3014(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandTN.java
index 42c696e95d7..992c823a414 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/PackageCreateCommandTN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -37,7 +41,7 @@ public class PackageCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +51,25 @@ public class PackageCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public PackageCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public PackageCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static PackageCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new PackageCreateCommandTN(req, eObject);
+ public static PackageCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new PackageCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public PackageCreateCommandTN(CreateElementRequest req) {
+ public PackageCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -87,7 +92,9 @@ public class PackageCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
+ return data.isPermitted();
}
/**
@@ -95,8 +102,19 @@ public class PackageCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package newElement = UMLFactory.eINSTANCE.createPackage();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_Package_2016(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShapeNamedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShapeNamedElementCreateCommand.java
index b386f92e6df..d257a7625c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShapeNamedElementCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShapeNamedElementCreateCommand.java
@@ -24,8 +24,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -35,7 +39,7 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -45,24 +49,25 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShapeNamedElementCreateCommand(req, eObject);
+ public static ShapeNamedElementCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShapeNamedElementCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShapeNamedElementCreateCommand(CreateElementRequest req) {
+ public ShapeNamedElementCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -85,7 +90,9 @@ public class ShapeNamedElementCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getNamedElement());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
index b7636d47fdc..5af300a4d91 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/ShortCutDiagramCreateCommand.java
@@ -37,7 +37,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -47,24 +47,25 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new ShortCutDiagramCreateCommand(req, eObject);
+ public static ShortCutDiagramCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new ShortCutDiagramCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public ShortCutDiagramCreateCommand(CreateElementRequest req) {
+ public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/SubjectClassifierCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/SubjectClassifierCreateCommandTN.java
index 2b90b516e29..5e3f3527063 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/SubjectClassifierCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/SubjectClassifierCreateCommandTN.java
@@ -24,8 +24,12 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -35,7 +39,7 @@ public class SubjectClassifierCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -45,24 +49,25 @@ public class SubjectClassifierCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public SubjectClassifierCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public SubjectClassifierCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static SubjectClassifierCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new SubjectClassifierCreateCommandTN(req, eObject);
+ public static SubjectClassifierCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new SubjectClassifierCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public SubjectClassifierCreateCommandTN(CreateElementRequest req) {
+ public SubjectClassifierCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -85,7 +90,9 @@ public class SubjectClassifierCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClassifier());
+ return data.isPermitted();
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseAsRectangleCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseAsRectangleCreateCommandTN.java
index ec88a5c2e20..5eb7f0b0aab 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseAsRectangleCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseAsRectangleCreateCommandTN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseAsRectangleCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseAsRectangleCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public UseCaseAsRectangleCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public UseCaseAsRectangleCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseAsRectangleCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new UseCaseAsRectangleCreateCommandTN(req, eObject);
+ public static UseCaseAsRectangleCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseAsRectangleCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseAsRectangleCreateCommandTN(CreateElementRequest req) {
+ public UseCaseAsRectangleCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class UseCaseAsRectangleCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class UseCaseAsRectangleCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_UseCase_2014(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseCreateCommandTN.java
index 3a8a08d17ea..18123926c08 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseCreateCommandTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseCreateCommandTN.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseCreateCommandTN extends EditElementCommand {
/**
* @generated
*/
- public UseCaseCreateCommandTN(CreateElementRequest req, EObject eObject) {
+ public UseCaseCreateCommandTN(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseCreateCommandTN create(CreateElementRequest req, EObject eObject) {
- return new UseCaseCreateCommandTN(req, eObject);
+ public static UseCaseCreateCommandTN create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseCreateCommandTN(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseCreateCommandTN(CreateElementRequest req) {
+ public UseCaseCreateCommandTN(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class UseCaseCreateCommandTN extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class UseCaseCreateCommandTN extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_UseCase_2013(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInComponentCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInComponentCreateCommand.java
index 3aeef9d7af9..025cb257fd3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInComponentCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInComponentCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseInComponentCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public UseCaseInComponentCreateCommand(CreateElementRequest req, EObject eObject) {
+ public UseCaseInComponentCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseInComponentCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new UseCaseInComponentCreateCommand(req, eObject);
+ public static UseCaseInComponentCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseInComponentCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseInComponentCreateCommand(CreateElementRequest req) {
+ public UseCaseInComponentCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class UseCaseInComponentCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class UseCaseInComponentCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Classifier owner = (Classifier)getElementToEdit();
- owner.getOwnedUseCases().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Classifier qualifiedTarget = (Classifier)target;
+ qualifiedTarget.getOwnedUseCases().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
Classifier childHolder = (Classifier)getElementToEdit();
childHolder.getUseCases().add(newElement);
ElementInitializers.getInstance().init_UseCase_3009(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInPackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInPackageCreateCommand.java
index c13ef9cea16..ffe8e986ccf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInPackageCreateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/commands/UseCaseInPackageCreateCommand.java
@@ -24,10 +24,14 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
import org.eclipse.papyrus.uml.diagram.usecase.providers.ElementInitializers;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UseCase;
/**
@@ -38,7 +42,7 @@ public class UseCaseInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- private EClass eClass = null;
+ private Diagram diagram = null;
/**
* @generated
@@ -48,24 +52,25 @@ public class UseCaseInPackageCreateCommand extends EditElementCommand {
/**
* @generated
*/
- public UseCaseInPackageCreateCommand(CreateElementRequest req, EObject eObject) {
+ public UseCaseInPackageCreateCommand(CreateElementRequest req, EObject eObject, Diagram diagram) {
super(req.getLabel(), null, req);
this.eObject = eObject;
- this.eClass = eObject != null ? eObject.eClass() : null;
+ this.diagram = diagram;
}
/**
* @generated
*/
- public static UseCaseInPackageCreateCommand create(CreateElementRequest req, EObject eObject) {
- return new UseCaseInPackageCreateCommand(req, eObject);
+ public static UseCaseInPackageCreateCommand create(CreateElementRequest req, EObject eObject, Diagram diagram) {
+ return new UseCaseInPackageCreateCommand(req, eObject, diagram);
}
/**
* @generated
*/
- public UseCaseInPackageCreateCommand(CreateElementRequest req) {
+ public UseCaseInPackageCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
+ this.diagram = diagram;
}
/**
@@ -88,7 +93,9 @@ public class UseCaseInPackageCreateCommand extends EditElementCommand {
* @generated
*/
public boolean canExecute() {
- return true;
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getUseCase());
+ return data.isPermitted();
}
/**
@@ -96,8 +103,19 @@ public class UseCaseInPackageCreateCommand extends EditElementCommand {
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
UseCase newElement = UMLFactory.eINSTANCE.createUseCase();
- Package owner = (Package)getElementToEdit();
- owner.getPackagedElements().add(newElement);
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
ElementInitializers.getInstance().init_UseCase_3012(newElement);
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorAsRectangleItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorAsRectangleItemSemanticEditPolicyTN.java
index a13a96ec30d..079b0493d9b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorAsRectangleItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorAsRectangleItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ActorAsRectangleItemSemanticEditPolicyTN extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ActorAsRectangleItemSemanticEditPolicyTN extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInComponentItemSemanticEditPolicy.java
index e0992510233..b84454ae91e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInComponentItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ActorInComponentItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ActorInComponentItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInPackageItemSemanticEditPolicy.java
index b258e8dea0b..72941b3a72e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorInPackageItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ActorInPackageItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ActorInPackageItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorItemSemanticEditPolicyTN.java
index 3838573fe4a..24d648c9a4d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ActorItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ActorItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ActorItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/AssociationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/AssociationItemSemanticEditPolicy.java
index bb0c70563a2..6ff8629a5fd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/AssociationItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/AssociationItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInComponentItemSemanticEditPolicy.java
index f540eedf999..ed78d4dc623 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInComponentItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ComponentInComponentItemSemanticEditPolicy extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ComponentInComponentItemSemanticEditPolicy extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInPackageItemSemanticEditPolicy.java
index d2feb37b9cf..4c182058d52 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentInPackageItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class ComponentInPackageItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class ComponentInPackageItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases2ItemSemanticEditPolicy.java
index 62a235cf431..56504e61cae 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases2ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases2ItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorInComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ComponentInComponentCreateCommand;
@@ -61,31 +62,31 @@ public class ComponentUsecases2ItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseInComponentCreateCommand(req));
+ return getGEFWrapper(new UseCaseInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentInComponentCreateCommand(req));
+ return getGEFWrapper(new ComponentInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3017 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintInComponentCreateCommand(req));
+ return getGEFWrapper(new ConstraintInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3018 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorInComponentCreateCommand(req));
+ return getGEFWrapper(new ActorInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases3ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases3ItemSemanticEditPolicy.java
index d63a6a16636..26e3f1ee231 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases3ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/ComponentUsecases3ItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorInComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ComponentInComponentCreateCommand;
@@ -61,31 +62,31 @@ public class ComponentUsecases3ItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseInComponentCreateCommand(req));
+ return getGEFWrapper(new UseCaseInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentInComponentCreateCommand(req));
+ return getGEFWrapper(new ComponentInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3017 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintInComponentCreateCommand(req));
+ return getGEFWrapper(new ConstraintInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3018 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorInComponentCreateCommand(req));
+ return getGEFWrapper(new ActorInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartment2ItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartment2ItemSemanticEditPolicy.java
index c3d1b02f17b..b714a27e1a4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartment2ItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartment2ItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorInPackageCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ComponentInPackageCreateCommand;
@@ -62,37 +63,37 @@ public class PackagePackageableElementCompartment2ItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintInPackageCreateCommand(req));
+ return getGEFWrapper(new ConstraintInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3011 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorInPackageCreateCommand(req));
+ return getGEFWrapper(new ActorInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseInPackageCreateCommand(req));
+ return getGEFWrapper(new UseCaseInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentInPackageCreateCommand(req));
+ return getGEFWrapper(new ComponentInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3014 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
index 9b47c8fc217..0d8006e81f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorInPackageCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ComponentInPackageCreateCommand;
@@ -62,37 +63,37 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintInPackageCreateCommand(req));
+ return getGEFWrapper(new ConstraintInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_3011 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorInPackageCreateCommand(req));
+ return getGEFWrapper(new ActorInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_3012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseInPackageCreateCommand(req));
+ return getGEFWrapper(new UseCaseInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Component_3013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ComponentInPackageCreateCommand(req));
+ return getGEFWrapper(new ComponentInPackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_3014 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandCN(req));
+ return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectClassifierItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectClassifierItemSemanticEditPolicyTN.java
index aaabda9ef9c..430cb0552e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectClassifierItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectClassifierItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -117,7 +118,7 @@ public class SubjectClassifierItemSemanticEditPolicyTN extends UMLBaseItemSemant
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -188,7 +189,7 @@ public class SubjectClassifierItemSemanticEditPolicyTN extends UMLBaseItemSemant
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectComponentUsecasesItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectComponentUsecasesItemSemanticEditPolicy.java
index 8bc802a6528..964aafd4f4e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectComponentUsecasesItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectComponentUsecasesItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ConstraintInComponentCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.UseCaseInComponentCreateCommand;
@@ -59,19 +60,19 @@ public class SubjectComponentUsecasesItemSemanticEditPolicy extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseInComponentCreateCommand(req));
+ return getGEFWrapper(new UseCaseInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_3015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandCN(req));
+ return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_3017 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintInComponentCreateCommand(req));
+ return getGEFWrapper(new ConstraintInComponentCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectItemSemanticEditPolicyTN.java
index 56e3d329e68..85a301c0bb3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/SubjectItemSemanticEditPolicyTN.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -91,7 +92,7 @@ public class SubjectItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
}
if(UMLElementTypes.Association_4011 == req.getElementType()) {
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == req.getElementType()) {
return null;
@@ -125,7 +126,7 @@ public class SubjectItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
}
if(UMLElementTypes.Association_4011 == req.getElementType()) {
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == req.getElementType()) {
return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseAsRectangleItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseAsRectangleItemSemanticEditPolicyTN.java
index 6903cb2c5f7..6f87badace0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseAsRectangleItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseAsRectangleItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -133,7 +134,7 @@ public class UseCaseAsRectangleItemSemanticEditPolicyTN extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -216,7 +217,7 @@ public class UseCaseAsRectangleItemSemanticEditPolicyTN extends UMLBaseItemSeman
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramItemSemanticEditPolicy.java
index 848c6130f06..c101bc424c6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseDiagramItemSemanticEditPolicy.java
@@ -22,6 +22,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.common.commands.DuplicateNamedElementCommand;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorAsRectangleCreateCommandTN;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ActorCreateCommandTN;
@@ -72,67 +73,67 @@ public class UseCaseDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorCreateCommandTN(req));
+ return getGEFWrapper(new ActorCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Actor_2012 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ActorAsRectangleCreateCommandTN(req));
+ return getGEFWrapper(new ActorAsRectangleCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_2013 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseCreateCommandTN(req));
+ return getGEFWrapper(new UseCaseCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.UseCase_2014 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new UseCaseAsRectangleCreateCommandTN(req));
+ return getGEFWrapper(new UseCaseAsRectangleCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Classifier_2015 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new SubjectClassifierCreateCommandTN(req));
+ return getGEFWrapper(new SubjectClassifierCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Package_2016 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new PackageCreateCommandTN(req));
+ return getGEFWrapper(new PackageCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Constraint_2017 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ConstraintCreateCommandTN(req));
+ return getGEFWrapper(new ConstraintCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Comment_2018 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new CommentCreateCommandTN(req));
+ return getGEFWrapper(new CommentCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2022 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new DefaultNamedElementCreateCommandTN(req));
+ return getGEFWrapper(new DefaultNamedElementCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.NamedElement_2023 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShapeNamedElementCreateCommand(req));
+ return getGEFWrapper(new ShapeNamedElementCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.Diagram_2019 == baseElementType) {
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ShortCutDiagramCreateCommand(req));
+ return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInComponentItemSemanticEditPolicy.java
index b4822410237..96e79ca9cc5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInComponentItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -133,7 +134,7 @@ public class UseCaseInComponentItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -216,7 +217,7 @@ public class UseCaseInComponentItemSemanticEditPolicy extends UMLBaseItemSemanti
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInPackageItemSemanticEditPolicy.java
index 391e261a820..3002b3fc861 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseInPackageItemSemanticEditPolicy.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -133,7 +134,7 @@ public class UseCaseInPackageItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -216,7 +217,7 @@ public class UseCaseInPackageItemSemanticEditPolicy extends UMLBaseItemSemanticE
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseItemSemanticEditPolicyTN.java
index 6d1ef113736..6af75b78126 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCaseItemSemanticEditPolicyTN.java
@@ -25,6 +25,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelations
import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.AbstractionCreateCommand;
@@ -133,7 +134,7 @@ public class UseCaseItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
return null;
@@ -216,7 +217,7 @@ public class UseCaseItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli
if(isExtendedType) {
return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget(), DiagramUtils.getDiagramFrom(getHost())));
}
if(UMLElementTypes.ConstraintConstrainedElement_4012 == baseElementType) {
if(isExtendedType) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInComponentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInComponentItemSemanticEditPolicy.java
index ba6b363b895..66e1c973c3c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInComponentItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInComponentItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ExtensionPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class UseCasePointsInComponentItemSemanticEditPolicy extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExtensionPointCreateCommand(req));
+ return getGEFWrapper(new ExtensionPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInPackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInPackageItemSemanticEditPolicy.java
index ac55e1b9b54..4dd1591870a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInPackageItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInPackageItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ExtensionPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class UseCasePointsInPackageItemSemanticEditPolicy extends UMLBaseItemSem
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExtensionPointCreateCommand(req));
+ return getGEFWrapper(new ExtensionPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInRectangleItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInRectangleItemSemanticEditPolicy.java
index 241450008ca..71014a09e07 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInRectangleItemSemanticEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsInRectangleItemSemanticEditPolicy.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ExtensionPointInRectangleCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class UseCasePointsInRectangleItemSemanticEditPolicy extends UMLBaseItemS
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExtensionPointInRectangleCreateCommand(req));
+ return getGEFWrapper(new ExtensionPointInRectangleCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicyTN.java
index 3f234d8f6ab..b66cf3be44a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicyTN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/edit/policies/UseCasePointsItemSemanticEditPolicyTN.java
@@ -18,6 +18,7 @@ import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.usecase.edit.commands.ExtensionPointCreateCommand;
import org.eclipse.papyrus.uml.diagram.usecase.providers.UMLElementTypes;
@@ -57,7 +58,7 @@ public class UseCasePointsItemSemanticEditPolicyTN extends UMLBaseItemSemanticEd
if(isExtendedType) {
return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
}
- return getGEFWrapper(new ExtensionPointCreateCommand(req));
+ return getGEFWrapper(new ExtensionPointCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
index 74920823f3b..988a5034a79 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src/org/eclipse/papyrus/uml/diagram/usecase/part/UMLVisualIDRegistry.java
@@ -182,17 +182,8 @@ public class UMLVisualIDRegistry {
return Integer.toString(visualID);
}
- /**
- * @generated
- */
public static int getDiagramVisualID(EObject domainElement) {
- if(domainElement == null) {
- return -1;
- }
- if(UMLPackage.eINSTANCE.getPackage().isSuperTypeOf(domainElement.eClass()) && isDiagram((Package)domainElement)) {
- return UseCaseDiagramEditPart.VISUAL_ID;
- }
- return -1;
+ return UseCaseDiagramEditPart.VISUAL_ID;
}
/**
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 2df4a055e8c..a94137414af 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
@@ -14,6 +14,7 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0",
org.eclipse.core.expressions;bundle-version="3.4.0"
Export-Package: org.eclipse.papyrus.uml.diagram.wizards,
org.eclipse.papyrus.uml.diagram.wizards.category,
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 162668f7bda..debaef87057 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
@@ -27,6 +27,7 @@ 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;
@@ -36,7 +37,6 @@ 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.commands.ICreationCommand;
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;
@@ -46,6 +46,7 @@ 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;
@@ -55,6 +56,7 @@ 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;
@@ -586,13 +588,19 @@ public class CreateModelWizard extends Wizard implements INewWizard {
* the category id
*/
protected void initDiagrams(ModelSet resourceSet, EObject root, String categoryId) {
- List<ICreationCommand> creationCommands = getDiagramKindsFor(categoryId);
+ if (root == null) {
+ 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).createDiagram(resourceSet, root, diagramName);
+ creationCommands.get(i).instantiateOn(root, diagramName);
}
}
}
@@ -604,8 +612,8 @@ public class CreateModelWizard extends Wizard implements INewWizard {
* the category id
* @return the diagram kinds for
*/
- protected List<ICreationCommand> getDiagramKindsFor(String categoryId) {
- return selectDiagramKindPage.getCreationCommands(categoryId);
+ protected List<ViewPrototype> getPrototypesFor(String categoryId) {
+ return selectDiagramKindPage.getSelectedPrototypes(categoryId);
}
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 6576071f499..dcf7560a705 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
@@ -79,7 +79,7 @@ public class NewPapyrusProjectWithMultiModelsWizard extends NewPapyrusProjectWiz
return false;
}
for (String category: getDiagramCategoryIds()) {
- if (myDoNotCreateModelForNoDiagrams && getDiagramKindsFor(category).isEmpty()){
+ if (myDoNotCreateModelForNoDiagrams && getPrototypesFor(category).isEmpty()){
// don't create model
continue;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java
index bb4e472ae95..38d71b647c2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindContentProvider.java
@@ -14,32 +14,51 @@
package org.eclipse.papyrus.uml.diagram.wizards.kind;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.commands.CreationCommandDescriptor;
-import org.eclipse.papyrus.commands.ICreationCommandRegistry;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* The ContentProvider for DiagramCategory table.
- * Returns available diagram kinds for the giben diagram category(ies).
+ * Returns available diagram kinds for the given diagram category(ies).
*/
public class DiagramKindContentProvider implements IStructuredContentProvider {
- /** The creation command registry. */
- private final ICreationCommandRegistry creationCommandRegistry;
-
+ private final Map<String, Collection<ViewPrototype>> prototypes;
/**
* Instantiates a new diagram kind content provider.
*
- * @param creationCommandRegistry the creation command registry
*/
- public DiagramKindContentProvider(ICreationCommandRegistry creationCommandRegistry) {
- this.creationCommandRegistry = creationCommandRegistry;
+ public DiagramKindContentProvider() {
+ Collection<ViewPrototype> vps = PolicyChecker.getCurrent().getAllPrototypes();
+ this.prototypes = new HashMap<String, Collection<ViewPrototype>>();
+ for (ViewPrototype vp : vps)
+ for (Category category : vp.getCategories())
+ cache(category.getName(), vp);
+ }
+
+ /**
+ * Stores the given diagram prototype in the cache
+ * @param prototype The prototype to cache
+ */
+ private void cache(String category, ViewPrototype prototype) {
+ if (!prototypes.containsKey(category))
+ prototypes.put(category, new ArrayList<ViewPrototype>());
+ prototypes.get(category).add(prototype);
}
@@ -49,6 +68,7 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
*/
public void dispose() {
+ prototypes.clear();
}
/**
@@ -71,16 +91,16 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
*/
public Object[] getElements(Object inputElement) {
if(inputElement instanceof Object[]) {
- List<CreationCommandDescriptor> result = new ArrayList<CreationCommandDescriptor>();
+ List<ViewPrototype> result = new ArrayList<ViewPrototype>();
for (Object next: (Object[])inputElement) {
if (next instanceof String) {
String diagramCategory = (String)next;
- result.addAll(getCreationCommands(diagramCategory));
+ result.addAll(getPrototypes(diagramCategory));
}
}
- Collections.sort(result, new Comparator<CreationCommandDescriptor>() {
+ Collections.sort(result, new Comparator<ViewPrototype>() {
- public int compare(CreationCommandDescriptor o1, CreationCommandDescriptor o2) {
+ public int compare(ViewPrototype o1, ViewPrototype o2) {
return o1.getLabel().compareTo(o2.getLabel());
}
});
@@ -88,7 +108,7 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
}
if(inputElement instanceof String) {
String diagramCategory = (String)inputElement;
- List<CreationCommandDescriptor> result = getCreationCommands(diagramCategory);
+ List<ViewPrototype> result = getPrototypes(diagramCategory);
return result.toArray(new Object[result.size()]);
}
return null;
@@ -100,22 +120,46 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
* @param diagramCategory the diagram category
* @return the creation commands
*/
- protected List<CreationCommandDescriptor> getCreationCommands(String diagramCategory) {
- List<CreationCommandDescriptor> result = new ArrayList<CreationCommandDescriptor>();
- for(CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
- if(diagramCategory != null && diagramCategory.equals(desc.getLanguage())) {
- result.add(desc);
+ protected List<ViewPrototype> getPrototypes(String diagramCategory) {
+ List<ViewPrototype> result = new ArrayList<ViewPrototype>();
+ if (!prototypes.containsKey(diagramCategory))
+ return result;
+ EClass rootType = getExpectedRootType(diagramCategory);
+ for(ViewPrototype proto : prototypes.get(diagramCategory))
+ if (isAllowedOn(proto, rootType))
+ result.add(proto);
+ return result;
+ }
+
+ private EClass getExpectedRootType(String category) {
+ if ("profile".equals(category))
+ return UMLPackage.eINSTANCE.getProfile();
+ return UMLPackage.eINSTANCE.getModel();
+ }
+
+ private boolean isAllowedOn(ViewPrototype prototype, EClass clazz) {
+ PapyrusView current = prototype.getConfiguration();
+ while (current != null) {
+ for (ModelRule rule : current.getModelRules()) {
+ int result = allows(rule, clazz);
+ if (result == -1)
+ return false;
+ if (result == 1)
+ return true;
}
+ current = current.getParent();
}
- return result;
+ return false;
}
- /**
- * Gets the creation command registry.
- *
- * @return the creation command registry
- */
- private ICreationCommandRegistry getCreationCommandRegistry() {
- return creationCommandRegistry;
+ private int allows(ModelRule rule, EClass owner) {
+ EClass c = rule.getElement();
+ if (c == null || c.isSuperTypeOf(owner)) {
+ // matching type => check the application of the required stereotypes
+ return rule.isPermit() ? 1 : -1;
+ } else {
+ // type is not matching => unknown
+ return 0;
+ }
}
} \ 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/kind/DiagramKindLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java
index c4e68a459b7..05ceb4c43cf 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
@@ -13,10 +13,9 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.wizards.kind;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.papyrus.commands.CreationCommandDescriptor;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.uml.diagram.wizards.Messages;
import org.eclipse.swt.graphics.Image;
@@ -33,13 +32,9 @@ public class DiagramKindLabelProvider implements ILabelProvider {
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*/
public Image getImage(Object element) {
- // TODO use ImageRegistry to store images
- if(element instanceof CreationCommandDescriptor) {
- ImageDescriptor image = ((CreationCommandDescriptor)element).getIcon();
- // image is an optional attribute
- if(image != null) {
- return new Image(null, image.getImageData());
- }
+ if(element instanceof ViewPrototype) {
+ ViewPrototype proto = (ViewPrototype)element;
+ return proto.getIcon();
}
return null;
}
@@ -48,8 +43,9 @@ public class DiagramKindLabelProvider implements ILabelProvider {
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
- if(element instanceof CreationCommandDescriptor) {
- return ((CreationCommandDescriptor)element).getLabel();
+ if(element instanceof ViewPrototype) {
+ ViewPrototype proto = (ViewPrototype)element;
+ return proto.getLabel();
}
return UNDEFINED_ELEMENT;
}
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 331f1f51180..56151256f06 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
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.papyrus.uml.diagram.wizards.pages;
-import static org.eclipse.papyrus.uml.diagram.wizards.Activator.log;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -27,8 +25,9 @@ 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.ICreationCommand;
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;
@@ -267,61 +266,21 @@ public class SelectDiagramKindPage extends WizardPage {
}
/**
- * Gets the creation commands.
- *
- * @return the creation command
- */
- public List<ICreationCommand> getCreationCommands() {
- CreationCommandDescriptor[] selected = getSelectedDiagramKindDescriptors();
- List<ICreationCommand> commands = new ArrayList<ICreationCommand>();
- for(int i = 0; i < selected.length; i++) {
-
- ICreationCommand command;
- try {
- command = (selected[i]).getCommand();
- commands.add(command);
- } catch (Exception e) {
- log.error(e);
- }
- }
- return commands;
- }
-
- /**
- * Gets the creation commands.
- *
- * @param categoryId
- * the category id
- * @return the creation commands
- */
- public List<ICreationCommand> getCreationCommands(String categoryId) {
- List<CreationCommandDescriptor> selected = getSelectedCommandDescriptors(categoryId);
- List<ICreationCommand> commands = new ArrayList<ICreationCommand>();
- for(CreationCommandDescriptor next : selected) {
- ICreationCommand command;
- try {
- command = next.getCommand();
- commands.add(command);
- } catch (Exception e) {
- log.error(e);
- }
- }
- return commands;
- }
-
- /**
* Gets the selected command descriptors.
*
* @param categoryId
* the category id
* @return the selected command descriptors
*/
- protected List<CreationCommandDescriptor> getSelectedCommandDescriptors(String categoryId) {
- CreationCommandDescriptor[] selected = getSelectedDiagramKindDescriptors();
- List<CreationCommandDescriptor> commands = new ArrayList<CreationCommandDescriptor>();
+ public List<ViewPrototype> getSelectedPrototypes(String categoryId) {
+ ViewPrototype[] selected = getSelectedPrototypes();
+ List<ViewPrototype> commands = new ArrayList<ViewPrototype>();
for(int i = 0; i < selected.length; i++) {
- if(selected[i].getLanguage().equals(categoryId)) {
- commands.add(selected[i]);
+ for (Category category : selected[i].getCategories()) {
+ if (category.getName().equals(categoryId)) {
+ commands.add(selected[i]);
+ break;
+ }
}
}
return commands;
@@ -380,7 +339,7 @@ public class SelectDiagramKindPage extends WizardPage {
}
});
diagramKindTableViewer = new CheckboxTableViewer(diagramKindTable);
- diagramKindTableViewer.setContentProvider(new DiagramKindContentProvider(getCreationCommandRegistry()));
+ diagramKindTableViewer.setContentProvider(new DiagramKindContentProvider());
diagramKindTableViewer.setLabelProvider(createDiagramKindLabelProvider());
}
@@ -504,12 +463,7 @@ public class SelectDiagramKindPage extends WizardPage {
* @return the selected diagram kinds
*/
public String[] getSelectedDiagramKinds(String categoryId) {
- List<CreationCommandDescriptor> descriptors = getSelectedCommandDescriptors(categoryId);
- String[] result = new String[descriptors.size()];
- for(int i = 0; i < descriptors.size(); i++) {
- result[i] = descriptors.get(i).getCommandId();
- }
- return result;
+ return new String[0];
}
/**
@@ -517,10 +471,10 @@ public class SelectDiagramKindPage extends WizardPage {
*
* @return the selected diagram kind descriptors
*/
- protected CreationCommandDescriptor[] getSelectedDiagramKindDescriptors() {
+ protected ViewPrototype[] getSelectedPrototypes() {
Object[] checked = diagramKindTableViewer.getCheckedElements();
// as Object is not a subclass of String we cannot cast Object[] to String[]
- CreationCommandDescriptor[] result = Arrays.asList(checked).toArray(new CreationCommandDescriptor[checked.length]);
+ ViewPrototype[] result = Arrays.asList(checked).toArray(new ViewPrototype[checked.length]);
return result;
}
diff --git a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF
index 073620de703..dae3136a11c 100644
--- a/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer/META-INF/MANIFEST.MF
@@ -1,36 +1,43 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.modelexplorer,org.eclipse.papy
- rus.uml.modelexplorer.factory,org.eclipse.papyrus.uml.modelexplorer.h
- andler,org.eclipse.papyrus.uml.modelexplorer.queries,org.eclipse.papy
- rus.uml.modelexplorer.util
+Export-Package: org.eclipse.papyrus.uml.modelexplorer,
+ org.eclipse.papyrus.uml.modelexplorer.factory,
+ org.eclipse.papyrus.uml.modelexplorer.handler,
+ org.eclipse.papyrus.uml.modelexplorer.queries,
+ org.eclipse.papyrus.uml.modelexplorer.util
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,bin/
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.pa
- pyrus.views.modelexplorer;bundle-version="1.0.0",org.eclipse.ui.navig
- ator;bundle-version="3.4.0",org.eclipse.emf.transaction;bundle-versio
- n="1.4.0",org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",org.ecli
- pse.gmf.runtime.notation;bundle-version="1.5.0",org.eclipse.papyrus.i
- nfra.emf;bundle-version="1.0.0",com.google.guava;bundle-version="11.0
- .0",org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",org.ecl
- ipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",org.eclips
- e.ui.views.properties.tabbed;bundle-version="3.5.300",org.eclipse.ui.
- ide;bundle-version="3.8.0",org.eclipse.uml2.uml;bundle-version="4.0.0
- ",org.eclipse.papyrus.infra.core;bundle-version="1.0.0",org.eclipse.p
- apyrus.infra.widgets;bundle-version="1.0.0",org.eclipse.papyrus.uml.t
- ools;bundle-version="1.0.0",org.eclipse.papyrus.uml.service.types;bun
- dle-version="1.0.0",org.eclipse.papyrus.infra.services.edit;bundle-ve
- rsion="1.0.0",org.eclipse.papyrus.emf.facet.custom.metamodel,org.ecli
- pse.papyrus.emf.facet.query.java.core,org.eclipse.emf.ecore,org.eclip
- se.papyrus.emf.facet.efacet.core
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="1.0.0",
+ org.eclipse.ui.navigator;bundle-version="3.4.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
+ org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.300",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.emf.facet.custom.metamodel,
+ org.eclipse.papyrus.emf.facet.query.java.core,
+ org.eclipse.emf.ecore,
+ org.eclipse.papyrus.emf.facet.efacet.core,
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.uml.modelexplorer.Activator
Import-Package: org.eclipse.papyrus.emf.facet.custom.core
-Bundle-SymbolicName: org.eclipse.papyrus.uml.modelexplorer;singleton:=
- true
-
+Bundle-SymbolicName: org.eclipse.papyrus.uml.modelexplorer;singleton:=true
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/plugin.xml
index 075026e20b9..2fde88e0772 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/plugin.xml
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config/plugin.xml
@@ -4,7 +4,8 @@
<extension
point="org.eclipse.papyrus.infra.nattable.configuration">
<configuration
- file="configs/generic.nattableconfiguration">
+ file="configs/generic.nattableconfiguration"
+ type="PapyrusGenericTable">
</configuration>
</extension>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic/plugin.xml
index 57d0754afcf..d3c99e240cd 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic/plugin.xml
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic/plugin.xml
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="configs/generic.nattableconfiguration"
+ type="PapyrusGenericTable">
+ </configuration>
+ </extension>
+ <extension
point="org.eclipse.ui.commands">
<command
categoryId="org.eclipse.papyrus.editor.category"
@@ -11,62 +18,6 @@
</command>
</extension>
<extension
- id="create.table.menus"
- name="Create Table Menus"
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.infra.nattable.popupmenu.createnattable">
- <command
- commandId="org.eclipse.papyrus.uml.nattable.generic.create.command"
- mnemonic="&amp;G"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.papyrus.infra.nattable.menu.createnattable">
- <command
- commandId="org.eclipse.papyrus.uml.nattable.generic.create.command"
- mnemonic="&amp;G"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.papyrus.infra.nattable.toolbar.createnattable">
- <command
- commandId="org.eclipse.papyrus.uml.nattable.generic.create.command"
- mnemonic="&amp;G"
- style="push">
- <visibleWhen>
- <with
- variable="activeEditorId">
- <equals
- value="org.eclipse.papyrus.infra.core.papyrusEditor">
- </equals>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
- <extension
point="org.eclipse.ui.handlers">
<handler
commandId="org.eclipse.papyrus.uml.nattable.generic.create.command">
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
index 79c424569c1..7aba328d79f 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.0.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.emf.facet.custom.core;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0"
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="0.4.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.profile,
org.eclipse.papyrus.uml.profile.constraints,
org.eclipse.papyrus.uml.profile.definition,
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.profile/plugin.xml
index a9d6d447afd..e0c8c8dcb98 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/plugin.xml
@@ -164,5 +164,11 @@
provider="org.eclipse.papyrus.uml.profile.providers.ProfileDefinitionLabelProvider">
</labelProvider>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.profilehelper">
+ <helper
+ class="org.eclipse.papyrus.uml.profile.UMLProfileHelper">
+ </helper>
+ </extension>
</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/UMLProfileHelper.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/UMLProfileHelper.java
new file mode 100755
index 00000000000..ae0bd2aa74d
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/UMLProfileHelper.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * 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:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.profile;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+
+/**
+ * Implementation of the IProfileHelper interface for UML profiles
+ * @author Laurent Wouters
+ */
+public class UMLProfileHelper implements IProfileHelper {
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper#getAppliedProfiles(org.eclipse.emf.ecore.EObject)
+ */
+ public Collection<EPackage> getAppliedProfiles(EObject model) {
+ ArrayList<EPackage> result = new ArrayList<EPackage>();
+ if (!(model instanceof Element))
+ return result;
+ Element element = (Element)model;
+ Package p = element.getNearestPackage();
+ if (p == null)
+ return result;
+ for (Profile profile : p.getAllAppliedProfiles()) {
+ if (!result.contains(profile.getDefinition()))
+ result.add(profile.getDefinition());
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.viewpoints.policy.IProfileHelper#getAppliedStereotypes(org.eclipse.emf.ecore.EObject)
+ */
+ public Collection<EClass> getAppliedStereotypes(EObject object) {
+ ArrayList<EClass> result = new ArrayList<EClass>();
+ if (!(object instanceof Element))
+ return result;
+ Element element = (Element)object;
+ for (EObject app : element.getStereotypeApplications()) {
+ if (!result.contains(app.eClass()))
+ result.add(app.eClass());
+ }
+ return result;
+ }
+}
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
index 952200d7145..cd6485af111 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/META-INF/MANIFEST.MF
@@ -48,10 +48,11 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.emf.facet.query.java.core,
org.eclipse.papyrus.emf.facet.custom.core,
org.eclipse.papyrus.emf.facet.util.emf.ui;bundle-version="0.4.0",
- org.eclipse.papyrus.emf.facet.efacet.core,
+ org.eclipse.papyrus.emf.facet.efacet.core,
org.eclipse.papyrus.emf.facet.efacet,
org.eclipse.papyrus.emf.facet.efacet.metamodel,
- org.eclipse.papyrus.emf.facet.util.emf.core
+ org.eclipse.papyrus.emf.facet.util.emf.core,
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml
index f91145fc3d1..dd82366345f 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/plugin.xml
@@ -117,7 +117,10 @@
<menuContribution allPopups="false" locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup">
<menu id="org.eclipse.papyrus.views.modelexplorer.popupmenu.createchild" label="New Child">
</menu>
- <menu id="org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram" label="New Diagram">
+ <menu
+ icon="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/NewDiagram.gif"
+ id="org.eclipse.papyrus.views.modelexplorer.popupmenu.creatediagram"
+ label="New Diagram">
</menu>
<command commandId="org.eclipse.ui.edit.delete" disabledIcon="IMG_TOOL_DELETE_DISABLED" icon="IMG_TOOL_DELETE" label="Delete" style="push" tooltip="Delete">
<visibleWhen checkEnabled="true">
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/dnd/CommonDropAdapterAssistant.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/dnd/CommonDropAdapterAssistant.java
index a8c0ade3825..f438701eb39 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/dnd/CommonDropAdapterAssistant.java
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/dnd/CommonDropAdapterAssistant.java
@@ -36,18 +36,13 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ViewerDropAdapter;
-import org.eclipse.papyrus.commands.CreationCommandDescriptor;
import org.eclipse.papyrus.commands.CreationCommandRegistry;
-import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.ICreationCommandRegistry;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
@@ -60,6 +55,8 @@ import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.views.modelexplorer.Activator;
import org.eclipse.papyrus.views.modelexplorer.commands.MoveOpenableCommand;
import org.eclipse.swt.dnd.DND;
@@ -123,73 +120,46 @@ public class CommonDropAdapterAssistant extends org.eclipse.ui.navigator.CommonD
}
/**
- * get a list that contains command to move a diagram into a new element
+ * get a list that contains command to move a view into a new element
*
* @param domain
* the transactionnal edit domain, cannot be null
- * @param targetOwner
+ * @param target
* the target of the drop, cannot be null
- * @param childElement
+ * @param view
* the diagram that will move, cannot be null
* @return a list that contains one command to move the diagram
*/
- protected List<Command> getDropDiagramIntoCommand(TransactionalEditingDomain domain, EObject targetOwner, Diagram childElement) {
- List<Command> commandList = new ArrayList<Command>();
- EReference eref = NotationPackage.eINSTANCE.getView_Element();
- if(eref != null) {
- String diagType = childElement.getType();
- ICreationCommand correctCommandDescription = null;
- // check if diagram can exist in new location
- for(CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
- if(desc.getCondition() == null || desc.getCondition().create(targetOwner)) {
- try {
- ICreationCommand cmd = desc.getCommand();
- String type = cmd.getCreatedDiagramType();
- if(diagType == null || diagType.equals(type)) {
- // the descriptor correspond to existing diagram's type
- correctCommandDescription = cmd;
- break;
- }
- } catch (BackboneException e) {
- Activator.log.error(e);
- // stop here with unexecutable command
- commandList.add(UnexecutableCommand.INSTANCE);
- return commandList;
- }
- }
- }
- // check if diagram can be moved
- if(correctCommandDescription != null && correctCommandDescription.isParentReassignable()) {
- SetRequest setRequest = new SetRequest(childElement, eref, targetOwner);
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(childElement);
- if(provider != null) {
- // Retrieve reassignment command from the Element Edit service
- ICommand command = provider.getEditCommand(setRequest);
-
- if(command != null) {
- Resource targetNotationResource = getTargetNotationResource(targetOwner);
- if(targetNotationResource != null) {
- if(!targetNotationResource.equals(childElement.eResource())) {
-
- // move diagram in the correct resource
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "");
- cc.add(command);
- cc.add(new MoveOpenableCommand(domain, "", childElement, targetNotationResource));
-
- commandList.add(new GMFtoEMFCommandWrapper(cc));
- return commandList;
- } else { // diagram stays in the same resource. Only execute the set command
- commandList.add(new GMFtoEMFCommandWrapper(command));
- return commandList;
- }
- }
- }
+ protected Command getDropViewCommands(TransactionalEditingDomain domain, EObject target, EObject view) {
+
+
+ ViewPrototype proto = ViewPrototype.get(view);
+
+ // check if diagram can exist in new location
+ if (!proto.isOwnerReassignable() || !PolicyChecker.getCurrent().canOwnNewView(target, proto)) {
+ // stop here with unexecutable command
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ // Retrieve reassignment command from the Element Edit service
+ Command command = proto.getCommandChangeOwner(view, target);
+
+ if(command != null) {
+ Resource targetNotationResource = getTargetNotationResource(target);
+ if(targetNotationResource != null) {
+ if(!targetNotationResource.equals(view.eResource())) {
+ List<Command> list = new ArrayList<Command>();
+ list.add(command);
+ list.add(new GMFtoEMFCommandWrapper(new MoveOpenableCommand(domain, "", view, targetNotationResource)));
+ return new CompoundCommand(list);
+ } else { // diagram stays in the same resource. Only execute the set command
+ return command;
}
}
}
+
// Failed : stop here with unexecutable command
- commandList.add(UnexecutableCommand.INSTANCE);
- return commandList;
+ return UnexecutableCommand.INSTANCE;
}
protected Resource getTargetNotationResource(EObject targetOwner) {
@@ -378,20 +348,12 @@ public class CommonDropAdapterAssistant extends org.eclipse.ui.navigator.CommonD
while(it.hasNext()) {
Object object = it.next();
EObject eObjectchild = EMFHelper.getEObject(object);
-
- // if(eObjectchild instanceof Diagram){
- // result.addAll(getDropDiagramIntoCommand(getEditingDomain(), targetEObject,(Diagram) eObjectchild));
- // }
-
- //FIXME: Editors are not necessarily diagrams
- //Temporary fix: Check whether the eObjectChild is an instanceof Diagram
- if(eObjectchild instanceof Diagram && getEditors(targetEObject).contains(eObjectchild)) {
- result.addAll(getDropDiagramIntoCommand(getEditingDomain(targetEObject), targetEObject, (Diagram)eObjectchild));
+
+ if (ViewPrototype.isViewObject(eObjectchild) && getEditors(targetEObject).contains(eObjectchild)) {
+ result.add(getDropViewCommands(getEditingDomain(targetEObject), targetEObject, eObjectchild));
}
-
//test if object is an eobject
else if(eObjectchild != null) {
-
result.addAll(getDropIntoCommand(getEditingDomain(targetEObject), targetEObject, eObjectchild, eref));
}
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/OpenHandler.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/OpenHandler.java
index 5fc445d33d5..b10fd991f07 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/OpenHandler.java
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/handler/OpenHandler.java
@@ -23,7 +23,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
* This handler allows to Open Diagrams and Tables
@@ -76,7 +79,9 @@ public class OpenHandler extends AbstractModelExplorerHandler implements IExecut
final List<EObject> pagesToOpen = new LinkedList<EObject>();
List<EObject> pagesToSelect = new LinkedList<EObject>();
for(EObject selected : selectedProperties) {
- if(!pageManager.isOpen(selected) || isDuplicateDiagramAllowed) {
+ if (!canOpenByPolicy(selected))
+ continue;
+ if (!pageManager.isOpen(selected) || isDuplicateDiagramAllowed) {
pagesToOpen.add(selected);
} else {
pagesToSelect.add(selected);
@@ -97,7 +102,21 @@ public class OpenHandler extends AbstractModelExplorerHandler implements IExecut
}
/**
- *
+ * Determines whether the current policy allows this object to be opened
+ * @param selection The object to open
+ * @return <code>true</code> if the object can be opened
+ */
+ private boolean canOpenByPolicy(EObject selection) {
+ if (selection instanceof Diagram) {
+ Diagram diagram = (Diagram)selection;
+ ViewPrototype proto = DiagramUtils.getPrototype(diagram);
+ return (proto != ViewPrototype.UNAVAILABLE_VIEW && proto != ViewPrototype.UNAVAILABLE_DIAGRAM);
+ }
+ return true;
+ }
+
+ /**
+ *
* @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String,
* java.lang.Object)
*
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/listener/DoubleClickListener.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/listener/DoubleClickListener.java
index 0e5a3107912..ccf49a14aa8 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/listener/DoubleClickListener.java
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/listener/DoubleClickListener.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ISelection;
@@ -28,6 +29,8 @@ import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.IOpenable;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.papyrus.views.modelexplorer.Activator;
import org.eclipse.papyrus.views.modelexplorer.Messages;
@@ -68,7 +71,7 @@ public class DoubleClickListener implements IDoubleClickListener {
Object currentObject = iter.next();
EObject diag = EMFHelper.getEObject(currentObject);
- if(isPage(diag, pageManager)) {
+ if(isPage(diag, pageManager) && canOpenByPolicy(diag)) {
if(pageManager.isOpen(diag)) {
pageToSelect = diag;
} else {
@@ -89,6 +92,20 @@ public class DoubleClickListener implements IDoubleClickListener {
}
}
+ /**
+ * Determines whether the current policy allows this object to be opened
+ * @param selection The object to open
+ * @return <code>true</code> if the object can be opened
+ */
+ private boolean canOpenByPolicy(EObject selection) {
+ if (selection instanceof Diagram) {
+ Diagram diagram = (Diagram)selection;
+ ViewPrototype proto = DiagramUtils.getPrototype(diagram);
+ return (proto != ViewPrototype.UNAVAILABLE_VIEW && proto != ViewPrototype.UNAVAILABLE_DIAGRAM);
+ }
+ return true;
+ }
+
protected boolean isPage(EObject element, IPageManager pageManager) {
if(pageManager.allPages().contains(element)) {
return true;
diff --git a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-trunk-nightly/build.rmap b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-trunk-nightly/build.rmap
index 1009ed3e3a9..656d1bcde99 100644
--- a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-trunk-nightly/build.rmap
+++ b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-trunk-nightly/build.rmap
@@ -103,6 +103,12 @@
</rm:uri>
</rm:provider>
<rm:provider componentTypes="osgi.bundle" readerType="local">
+ <rm:uri format="{0}/plugins/infra/viewpoints/{1}">
+ <bc:propertyRef key="local.repository"/>
+ <bc:propertyRef key="buckminster.component"/>
+ </rm:uri>
+ </rm:provider>
+ <rm:provider componentTypes="osgi.bundle" readerType="local">
<rm:uri format="{0}/plugins/infra/widget/{1}">
<bc:propertyRef key="local.repository"/>
<bc:propertyRef key="buckminster.component"/>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 5361a1602b6..d9cbe4ec4a2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.diagram.pkg.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="1.0.0",
org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.0.0",
org.eclipse.papyrus.diagram.stereotypeproperty.tests;bundle-version="1.0.0",
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index f862d5e0e83..762f31ecc80 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -85,7 +85,6 @@ public class AllTests {
/* uml idagrams */
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.diagram.clazz.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.activity.tests.AllTests.class));
- suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.pkg.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.deployment.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.component.test.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.timing.tests.AllTests.class));
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java
index f7cecc50e46..21b11e28514 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/IRequirementDiagramTestsConstants.java
@@ -19,4 +19,19 @@ public interface IRequirementDiagramTestsConstants {
/** name of the test model */
public final String FILE_NAME = "RequirmentDiagramTest.di";
+
+ public final String PROFILE_SYSML = "http://www.eclipse.org/papyrus/0.7.0/SysML";
+
+ public final String PROFILE_SYSML_BLOCKS = "http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks";
+
+ public final String PROFILE_SYSML_PORTS = "http://www.eclipse.org/papyrus/0.7.0/SysML/PortAndFlows";
+
+ public final String PROFILE_SYSML_CONSTRAINTS = "http://www.eclipse.org/papyrus/0.7.0/SysML/Constraints";
+
+ public final String[] PROFILES = new String[] {
+ PROFILE_SYSML,
+ PROFILE_SYSML_BLOCKS,
+ PROFILE_SYSML_PORTS,
+ PROFILE_SYSML_CONSTRAINTS
+ };
} \ No newline at end of file
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java
index 001e1ac8874..1d37f2e9bcf 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/AbstractPapyrusTestCase.java
@@ -14,6 +14,7 @@ package org.eclipse.papyrus.sysml.diagram.requirement.test.canonical;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.sysml.diagram.requirement.RequirementDiagramCreateCommand;
+import org.eclipse.papyrus.sysml.diagram.requirement.test.IRequirementDiagramTestsConstants;
/**
* The Class AbstractPapyrusTestCase.
@@ -24,4 +25,9 @@ public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.diagra
protected ICreationCommand getDiagramCommandCreation() {
return new RequirementDiagramCreateCommand();
}
+
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
}
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java
index 45becef7983..eae349fab7a 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramChildNode.java
@@ -47,6 +47,11 @@ public class TestRequirementDiagramChildNode extends TestChildNode {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage i package.
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java
index 9564f7b9426..9ac1d1e7ec5 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramCommentLink.java
@@ -36,6 +36,11 @@ public class TestRequirementDiagramCommentLink extends TestCommentLink {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage Comment
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java
index d461d67b6ad..970630cd3e8 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramConstraintLink.java
@@ -36,6 +36,11 @@ public class TestRequirementDiagramConstraintLink extends TestConstraintLink {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage Constraint
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java
index bed42841728..1a06f05d486 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramContainment.java
@@ -36,6 +36,11 @@ public class TestRequirementDiagramContainment extends TestContainmentLink {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage containmentLink.
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
index e58813e1481..da1336d7ce5 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLink.java
@@ -39,6 +39,11 @@ public class TestRequirementDiagramLink extends TestLink {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage Abstraction
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
index 085f8271873..1bc722c334a 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramLinkOwnedBySource.java
@@ -36,6 +36,11 @@ public class TestRequirementDiagramLinkOwnedBySource extends TestLinkOwnedBySour
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage Package import
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java
index c804bd5198c..0c14e525a1a 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/canonical/TestRequirementDiagramTopNode.java
@@ -47,6 +47,11 @@ public class TestRequirementDiagramTopNode extends TestTopNode {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to manage i package.
*/
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java
index 9959b5b0ad4..06bd8326d81 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load100RequirementTest.java
@@ -37,6 +37,11 @@ public class Load100RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java
index e77b753b6a6..500f5d34715 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load10RequirementTest.java
@@ -37,6 +37,11 @@ public class Load10RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java
index 22f9d73a15f..0ff2a768eb0 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load200RequirementTest.java
@@ -37,6 +37,11 @@ public class Load200RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java
index e7d9f507698..33eca5936bb 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load300RequirementTest.java
@@ -37,6 +37,11 @@ public class Load300RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java
index 3999a6c95be..6b4ccf06ff3 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load400RequirementTest.java
@@ -37,6 +37,11 @@ public class Load400RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java
index 6821cb60faa..cb4c43b0b88 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests/src/org/eclipse/papyrus/sysml/diagram/requirement/test/load/Load500RequirementTest.java
@@ -37,6 +37,11 @@ public class Load500RequirementTest extends AbstractPapyrusTestCase {
return IRequirementDiagramTestsConstants.FILE_NAME;
}
+ @Override
+ protected String[] getRequiredProfiles() {
+ return IRequirementDiagramTestsConstants.PROFILES;
+ }
+
/**
* Test to create a node.
*
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/org.eclipse.papyrus.uml.diagram.composite.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/org.eclipse.papyrus.uml.diagram.composite.test.launch
index b35686d445d..61f25703e47 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/org.eclipse.papyrus.uml.diagram.composite.test.launch
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests/org.eclipse.papyrus.uml.diagram.composite.test.launch
@@ -32,8 +32,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.sun.el@default:default,com.sun.syndication@default:default,javaewah@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,lpg.runtime.java@default:default,net.sf.eclipsecs.branding@default:default,net.sf.eclipsecs.checkstyle@default:default,net.sf.eclipsecs.core@default:default,net.sf.eclipsecs.doc@default:default,net.sf.eclipsecs.ui@default:default,net.sf.jautodoc.velocity@default:default,net.sf.jautodoc@default:default,net.sourceforge.nattable.core@default:default,org.antlr.runtime@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.ws.commons.util@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.apache.xmlrpc@default:default,org.eclipse.acceleo.common@default:default,org.eclipse.acceleo.engine@default:default,org.eclipse.acceleo.model@default:default,org.eclipse.acceleo.parser@default:default,org.eclipse.acceleo.profiler@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.cdt.codan.core.cxx@default:default,org.eclipse.cdt.codan.core@default:default,org.eclipse.cdt.codan.ui.cxx@default:default,org.eclipse.cdt.codan.ui@default:default,org.eclipse.cdt.core@default:default,org.eclipse.cdt.make.core@default:default,org.eclipse.cdt.managedbuilder.core@default:default,org.eclipse.cdt.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.cvs@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient4@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.egit.core@default:default,org.eclipse.egit.doc@default:default,org.eclipse.egit.ui@default:default,org.eclipse.egit@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.dawn.gmf@default:default,org.eclipse.emf.cdo.dawn.ui@default:default,org.eclipse.emf.cdo.dawn.util@default:default,org.eclipse.emf.cdo.dawn@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare.diagram@default:default,org.eclipse.emf.compare.edit@default:default,org.eclipse.emf.compare.ide@default:default,org.eclipse.emf.compare.rcp@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.facet.aggregate.metamodel@default:default,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet.ui@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom.edit@default:default,org.eclipse.emf.facet.infra.browser.custom.ui@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.browser@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.common.ui@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet.edit@default:default,org.eclipse.emf.facet.infra.facet.editor@default:default,org.eclipse.emf.facet.infra.facet.ui@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query.edit@default:default,org.eclipse.emf.facet.infra.query.editor@default:default,org.eclipse.emf.facet.infra.query.ui@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore@default:default,org.eclipse.emf.facet.widgets.celleditors.edit@default:default,org.eclipse.emf.facet.widgets.celleditors@default:default,org.eclipse.emf.facet.widgets.nattable.instance.edit@default:default,org.eclipse.emf.facet.widgets.nattable.instance@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.edit@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration@default:default,org.eclipse.emf.facet.widgets.nattable.workbench@default:default,org.eclipse.emf.facet.widgets.nattable@default:default,org.eclipse.emf.facet.widgets.table.metamodel@default:default,org.eclipse.emf.facet.widgets.table.ui.nattable@default:default,org.eclipse.emf.facet.widgets.table.ui.workbench@default:default,org.eclipse.emf.facet.widgets.table.ui@default:default,org.eclipse.emf.facet.widgets@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.query.doc@default:default,org.eclipse.emf.query.examples@default:default,org.eclipse.emf.query.ocl@default:default,org.eclipse.emf.query@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.epp.mpc.core@default:default,org.eclipse.epp.mpc.help.ui@default:default,org.eclipse.epp.mpc.ui@default:default,org.eclipse.epp.package.standard@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.bridge.trace@default:default,org.eclipse.gmf.bridge.ui.dashboard@default:default,org.eclipse.gmf.bridge.ui@default:default,org.eclipse.gmf.bridge@default:default,org.eclipse.gmf.codegen.edit@default:default,org.eclipse.gmf.codegen.ui@default:default,org.eclipse.gmf.codegen@default:default,org.eclipse.gmf.common@default:default,org.eclipse.gmf.doc.ui@default:default,org.eclipse.gmf.doc@default:default,org.eclipse.gmf.ecore.editor@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.graphdef.codegen.ui@default:default,org.eclipse.gmf.graphdef.codegen@default:default,org.eclipse.gmf.graphdef.edit@default:default,org.eclipse.gmf.graphdef@default:default,org.eclipse.gmf.map.edit@default:default,org.eclipse.gmf.map@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.lite.svg@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation.sdk@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf.sdk@default:default,org.eclipse.gmf.tooldef.edit@default:default,org.eclipse.gmf.tooldef@default:default,org.eclipse.gmf.tooling.runtime@default:default,org.eclipse.gmf.tooling@default:default,org.eclipse.gmf.validate@default:default,org.eclipse.gmf.xpand.editor@default:default,org.eclipse.gmf.xpand.qvtlibrary@default:default,org.eclipse.gmf.xpand@default:default,org.eclipse.gmf@default:default,org.eclipse.gmt.modisco.infra.common.core@default:default,org.eclipse.gmt.modisco.infra.common.ui@default:default,org.eclipse.gmt.modisco.infra.discoverymanager@default:default,org.eclipse.gmt.modisco.xml.discoverer@default:default,org.eclipse.gmt.modisco.xml@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jdt.annotation@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jgit@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml.project@default:default,org.eclipse.m2m.qvt.oml.runtime@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.modisco.infra.discovery.core@default:default,org.eclipse.modisco.infra.discovery.ui@default:default,org.eclipse.modisco.infra.discovery@default:default,org.eclipse.modisco.xml.discoverer@default:default,org.eclipse.mylyn.bugzilla.core@default:default,org.eclipse.mylyn.bugzilla.ui@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.commons.xmlrpc@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.git.core@default:default,org.eclipse.mylyn.git.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.versions.core@default:default,org.eclipse.mylyn.versions.ui@default:default,org.eclipse.nebula.widgets.nattable.core@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default,org.eclipse.ocl.common.ui@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl.examples.common@default:default,org.eclipse.ocl.examples.domain@default:default,org.eclipse.ocl.examples.library@default:default,org.eclipse.ocl.examples.pivot@default:default,org.eclipse.ocl.examples.xtext.base@default:default,org.eclipse.ocl.examples.xtext.console@default:default,org.eclipse.ocl.examples.xtext.essentialocl.ui@default:default,org.eclipse.ocl.examples.xtext.essentialocl@default:default,org.eclipse.ocl.examples.xtext.markup.ui@default:default,org.eclipse.ocl.examples.xtext.markup@default:default,org.eclipse.ocl.uml@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.papyrus.acceleo@default:default,org.eclipse.papyrus.cdo.core@default:default,org.eclipse.papyrus.cdo.ui.customization.properties@default:default,org.eclipse.papyrus.cdo.ui.doc@default:default,org.eclipse.papyrus.cdo.ui@default:default,org.eclipse.papyrus.cdo.uml.diagram.ui@default:default,org.eclipse.papyrus.cdo.uml.ui@default:default,org.eclipse.papyrus.cdo.validation.problems.edit@default:default,org.eclipse.papyrus.cdo.validation.problems@default:default,org.eclipse.papyrus.cpp.codegen.ui@default:default,org.eclipse.papyrus.cpp.codegen@default:default,org.eclipse.papyrus.cpp.profile@default:default,org.eclipse.papyrus.customization.palette@default:default,org.eclipse.papyrus.customization.paletteconfiguration@default:default,org.eclipse.papyrus.customization.properties.generation@default:default,org.eclipse.papyrus.customization.properties.model.xwt@default:default,org.eclipse.papyrus.customization.properties@default:default,org.eclipse.papyrus.customization@default:default,org.eclipse.papyrus.diagramtemplate.edit@default:default,org.eclipse.papyrus.diagramtemplate.editor@default:default,org.eclipse.papyrus.diagramtemplate@default:default,org.eclipse.papyrus.dsml.validation.doc@default:default,org.eclipse.papyrus.dsml.validation.generator@default:default,org.eclipse.papyrus.dsml.validation.model.ui@default:default,org.eclipse.papyrus.dsml.validation.model@default:default,org.eclipse.papyrus.dsml.validation.properties@default:default,org.eclipse.papyrus.dsml.validation.wizard@default:default,org.eclipse.papyrus.dsml.validation@default:default,org.eclipse.papyrus.eastadl@default:default,org.eclipse.papyrus.eclipse.project.editors@default:default,org.eclipse.papyrus.editor@default:default,org.eclipse.papyrus.fcm.profile@default:default,org.eclipse.papyrus.infra.constraints.edit@default:default,org.eclipse.papyrus.infra.constraints.editor@default:default,org.eclipse.papyrus.infra.constraints@default:default,org.eclipse.papyrus.infra.core.log@default:default,org.eclipse.papyrus.infra.core.sasheditor.di@default:default,org.eclipse.papyrus.infra.core.sasheditor@default:default,org.eclipse.papyrus.infra.discovery.ui.menu@default:default,org.eclipse.papyrus.infra.discovery.ui@default:default,org.eclipse.papyrus.infra.discovery@default:default,org.eclipse.papyrus.infra.doc@default:default,org.eclipse.papyrus.infra.emf.appearance@default:default,org.eclipse.papyrus.infra.emf.diagram.common@default:default,org.eclipse.papyrus.infra.emf.facet.queries@default:default,org.eclipse.papyrus.infra.emf.nattable.converter@default:default,org.eclipse.papyrus.infra.emf.nattable@default:default,org.eclipse.papyrus.infra.emf.readonly@default:default,org.eclipse.papyrus.infra.emf@default:default,org.eclipse.papyrus.infra.export@default:default,org.eclipse.papyrus.infra.extendedtypes.emf@default:default,org.eclipse.papyrus.infra.extendedtypes@default:default,org.eclipse.papyrus.infra.gmfdiag.css.doc@default:default,org.eclipse.papyrus.infra.gmfdiag.modelexplorer@default:default,org.eclipse.papyrus.infra.hyperlink@default:default,org.eclipse.papyrus.infra.nattable.common@default:default,org.eclipse.papyrus.infra.nattable.controlmode@default:default,org.eclipse.papyrus.infra.nattable.model.edit@default:default,org.eclipse.papyrus.infra.nattable.model.editor@default:default,org.eclipse.papyrus.infra.nattable.model@default:default,org.eclipse.papyrus.infra.nattable.modelexplorer@default:default,org.eclipse.papyrus.infra.nattable.properties@default:default,org.eclipse.papyrus.infra.nattable.views.config@default:default,org.eclipse.papyrus.infra.nattable.views.editor@default:default,org.eclipse.papyrus.infra.nattable@default:default,org.eclipse.papyrus.infra.onefile@default:default,org.eclipse.papyrus.infra.psf@default:default,org.eclipse.papyrus.infra.queries.core.configuration.edit@default:default,org.eclipse.papyrus.infra.queries.core.configuration@default:default,org.eclipse.papyrus.infra.queries.core@default:default,org.eclipse.papyrus.infra.services.controlmode.history@default:default,org.eclipse.papyrus.infra.services.controlmode@default:default,org.eclipse.papyrus.infra.services.decoration@default:default,org.eclipse.papyrus.infra.services.edit@default:default,org.eclipse.papyrus.infra.services.labelprovider@default:default,org.eclipse.papyrus.infra.services.markerlistener@default:default,org.eclipse.papyrus.infra.services.navigation@default:default,org.eclipse.papyrus.infra.services.openelement@default:default,org.eclipse.papyrus.infra.services.resourceloading.preferences@default:default,org.eclipse.papyrus.infra.services.resourceloading@default:default,org.eclipse.papyrus.infra.services.semantic@default:default,org.eclipse.papyrus.infra.services.tracepoints@default:default,org.eclipse.papyrus.infra.services.validation@default:default,org.eclipse.papyrus.infra.services.viewersearch@default:default,org.eclipse.papyrus.infra.services.viewlabelprovider@default:default,org.eclipse.papyrus.infra.table.common@default:default,org.eclipse.papyrus.infra.table.controlmode@default:default,org.eclipse.papyrus.infra.table.instance@default:default,org.eclipse.papyrus.infra.table.menu@default:default,org.eclipse.papyrus.infra.table.modelexplorer@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.edit@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.editor@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel@default:default,org.eclipse.papyrus.infra.table.properties@default:default,org.eclipse.papyrus.infra.ui.resources@default:default,org.eclipse.papyrus.infra.widgets.toolbox@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.java.generator.jdtsynchronizer@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt.edit@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt.editor@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt@default:default,org.eclipse.papyrus.java.generator.transfo.umltojdt@default:default,org.eclipse.papyrus.java.generator.ui@default:default,org.eclipse.papyrus.java.profile.edit@default:default,org.eclipse.papyrus.java.profile.editor@default:default,org.eclipse.papyrus.java.profile@default:default,org.eclipse.papyrus.java.reverse.ui@default:default,org.eclipse.papyrus.java.reverse@default:default,org.eclipse.papyrus.marte.properties@default:default,org.eclipse.papyrus.marte.static.profile@default:default,org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext.ui@default:default,org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext@default:default,org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext.ui@default:default,org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext@default:default,org.eclipse.papyrus.marte.vsl.ui@default:default,org.eclipse.papyrus.marte.vsl@default:default,org.eclipse.papyrus.migration.properties.model@default:default,org.eclipse.papyrus.robotml.diagram.architecture@default:default,org.eclipse.papyrus.robotml.diagram.common@default:default,org.eclipse.papyrus.robotml.diagram.componentdef@default:default,org.eclipse.papyrus.robotml.diagram.datatypedef@default:default,org.eclipse.papyrus.robotml.diagram.interfacedef@default:default,org.eclipse.papyrus.robotml.diagram.ui@default:default,org.eclipse.papyrus.robotml.doc@default:default,org.eclipse.papyrus.robotml.generators.common@default:default,org.eclipse.papyrus.robotml.generators.intempora.rtmaps.ui@default:default,org.eclipse.papyrus.robotml.generators.intempora.rtmaps@default:default,org.eclipse.papyrus.robotml.modelexplorer@default:default,org.eclipse.papyrus.robotml.perspective@default:default,org.eclipse.papyrus.robotml.templaterepository@default:default,org.eclipse.papyrus.robotml.validation@default:default,org.eclipse.papyrus.robotml@default:default,org.eclipse.papyrus.sysml.diagram.requirement@default:default,org.eclipse.papyrus.sysml.diagram.ui@default:default,org.eclipse.papyrus.sysml.edit@default:default,org.eclipse.papyrus.sysml.facets@default:default,org.eclipse.papyrus.sysml.modelexplorer@default:default,org.eclipse.papyrus.sysml.nattable.allocation.config@default:default,org.eclipse.papyrus.sysml.nattable.allocation@default:default,org.eclipse.papyrus.sysml.nattable.menu@default:default,org.eclipse.papyrus.sysml.nattable.requirement.config@default:default,org.eclipse.papyrus.sysml.nattable.requirement@default:default,org.eclipse.papyrus.sysml.nattable@default:default,org.eclipse.papyrus.sysml.properties@default:default,org.eclipse.papyrus.sysml.table.allocation@default:default,org.eclipse.papyrus.sysml.table.requirement@default:default,org.eclipse.papyrus.texteditor.cdt@default:default,org.eclipse.papyrus.texteditor.model@default:default,org.eclipse.papyrus.texteditor.modelexplorer@default:default,org.eclipse.papyrus.uml.alf.ui@default:default,org.eclipse.papyrus.uml.alf@default:default,org.eclipse.papyrus.uml.appearance@default:default,org.eclipse.papyrus.uml.commands@default:default,org.eclipse.papyrus.uml.compare@default:default,org.eclipse.papyrus.uml.controlmode.profile@default:default,org.eclipse.papyrus.uml.diagram.activity@default:default,org.eclipse.papyrus.uml.diagram.clazz@default:default,org.eclipse.papyrus.uml.diagram.common.doc@default:default,org.eclipse.papyrus.uml.diagram.common.groups@default:default,org.eclipse.papyrus.uml.diagram.common.palette.customaction@default:default,org.eclipse.papyrus.uml.diagram.communication@default:default,org.eclipse.papyrus.uml.diagram.css@default:default,org.eclipse.papyrus.uml.diagram.deployment@default:default,org.eclipse.papyrus.uml.diagram.dnd@default:default,org.eclipse.papyrus.uml.diagram.icons@default:default,org.eclipse.papyrus.uml.diagram.interactionoverview@default:default,org.eclipse.papyrus.uml.diagram.modelexplorer@default:default,org.eclipse.papyrus.uml.diagram.navigation@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration@default:default,org.eclipse.papyrus.uml.diagram.pkg@default:default,org.eclipse.papyrus.uml.diagram.profile.doc@default:default,org.eclipse.papyrus.uml.diagram.profile@default:default,org.eclipse.papyrus.uml.diagram.sequence@default:default,org.eclipse.papyrus.uml.diagram.statemachine@default:default,org.eclipse.papyrus.uml.diagram.stereotype.edition@default:default,org.eclipse.papyrus.uml.diagram.symbols@default:default,org.eclipse.papyrus.uml.diagram.timing@default:default,org.eclipse.papyrus.uml.diagram.usecase@default:default,org.eclipse.papyrus.uml.documentation.profile@default:default,org.eclipse.papyrus.uml.export@default:default,org.eclipse.papyrus.uml.extensionpoints@default:default,org.eclipse.papyrus.uml.icons@default:default,org.eclipse.papyrus.uml.import@default:default,org.eclipse.papyrus.uml.modelexplorer.widgets@default:default,org.eclipse.papyrus.uml.modelexplorer@default:default,org.eclipse.papyrus.uml.modelrepair@default:default,org.eclipse.papyrus.uml.nattable.generic.config@default:default,org.eclipse.papyrus.uml.nattable.generic@default:default,org.eclipse.papyrus.uml.nattable.menu@default:default,org.eclipse.papyrus.uml.nattable@default:default,org.eclipse.papyrus.uml.navigation@default:default,org.eclipse.papyrus.uml.oclconstraintevaluation@default:default,org.eclipse.papyrus.uml.pastemanager@default:default,org.eclipse.papyrus.uml.perspective@default:default,org.eclipse.papyrus.uml.profile@default:default,org.eclipse.papyrus.uml.profilefacet.generation@default:default,org.eclipse.papyrus.uml.profilefacet.metamodel@default:default,org.eclipse.papyrus.uml.profilefacet@default:default,org.eclipse.papyrus.uml.properties@default:default,org.eclipse.papyrus.uml.resourceloading.profile@default:default,org.eclipse.papyrus.uml.search.ui.doc@default:default,org.eclipse.papyrus.uml.search.ui@default:default,org.eclipse.papyrus.uml.service.validation@default:default,org.eclipse.papyrus.uml.services.decoration@default:default,org.eclipse.papyrus.uml.table.common@default:default,org.eclipse.papyrus.uml.table.default@default:default,org.eclipse.papyrus.uml.table.widgets.celleditors@default:default,org.eclipse.papyrus.uml.templaterepository@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext@default:default,org.eclipse.papyrus.uml.textedit.common.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.common.xtext@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext@default:default,org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext@default:default,org.eclipse.papyrus.uml.textedit.javaconstraint@default:default,org.eclipse.papyrus.uml.textedit.message.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.message.xtext@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext@default:default,org.eclipse.papyrus.uml.textedit.port.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.port.xtext@default:default,org.eclipse.papyrus.uml.textedit.property.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.property.xtext@default:default,org.eclipse.papyrus.uml.textedit.state.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.state.xtext@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext@default:default,org.eclipse.papyrus.uml.tools.extendedtypes@default:default,org.eclipse.papyrus.uml.tools.utils@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.papyrus.umlrt.properties@default:default,org.eclipse.papyrus.umlrt.validation@default:default,org.eclipse.papyrus.umlrt.wizard@default:default,org.eclipse.papyrus.umlrt@default:default,org.eclipse.papyrus.views.cpp@default:default,org.eclipse.papyrus.views.modelexplorer.resourceloading@default:default,org.eclipse.papyrus.views.modelexplorer.widgets@default:default,org.eclipse.papyrus.views.modelexplorer@default:default,org.eclipse.papyrus.views.properties.model.edit@default:default,org.eclipse.papyrus.views.properties.model.editor@default:default,org.eclipse.papyrus.views.properties.model@default:default,org.eclipse.papyrus.views.properties@default:default,org.eclipse.papyrus.views.search@default:default,org.eclipse.papyrus.views.tracepoints@default:default,org.eclipse.papyrus.views.validation@default:default,org.eclipse.papyrus.xwt@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rcp@default:default,org.eclipse.search@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.l2@default:default,org.eclipse.uml2.uml.profile.l3@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.xpand@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.codetemplates.ui@default:default,org.eclipse.xtext.ui.codetemplates@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext@default:default,org.hamcrest.core@default:default,org.jdom@default:default,org.junit@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.0.v200806040011@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.papyrus.bundles.tests@default:default,org.eclipse.papyrus.core.queries.configuration.tests@default:default,org.eclipse.papyrus.core.queries.test@default:default,org.eclipse.papyrus.core.resourceloading.tests@default:false,org.eclipse.papyrus.core.tests@default:false,org.eclipse.papyrus.def@default:default,org.eclipse.papyrus.diagram.clazz.tests@default:default,org.eclipse.papyrus.diagram.common.tests@default:false,org.eclipse.papyrus.diagram.stereotypeproperty.tests@default:default,org.eclipse.papyrus.diagram.tests@default:default,org.eclipse.papyrus.domaincontextcodegen@default:default,org.eclipse.papyrus.editor.integration.tests@default:default,org.eclipse.papyrus.extensionpoints.editors@default:default,org.eclipse.papyrus.gmfgenextension@default:default,org.eclipse.papyrus.infra.core.sasheditor.di.tests@default:false,org.eclipse.papyrus.infra.core.sasheditor.tests@default:false,org.eclipse.papyrus.infra.core@default:default,org.eclipse.papyrus.infra.emf.tests@default:false,org.eclipse.papyrus.infra.gmfdiag.commands@default:default,org.eclipse.papyrus.infra.gmfdiag.common@default:default,org.eclipse.papyrus.infra.gmfdiag.controlmode@default:default,org.eclipse.papyrus.infra.gmfdiag.css.configuration@default:default,org.eclipse.papyrus.infra.gmfdiag.css.debug@default:default,org.eclipse.papyrus.infra.gmfdiag.css.model@default:default,org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.css.theme@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext@default:default,org.eclipse.papyrus.infra.gmfdiag.css@default:default,org.eclipse.papyrus.infra.gmfdiag.dnd@default:default,org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter@default:default,org.eclipse.papyrus.infra.gmfdiag.hyperlink@default:default,org.eclipse.papyrus.infra.gmfdiag.menu@default:default,org.eclipse.papyrus.infra.gmfdiag.navigation@default:default,org.eclipse.papyrus.infra.gmfdiag.outline@default:default,org.eclipse.papyrus.infra.gmfdiag.preferences@default:default,org.eclipse.papyrus.infra.gmfdiag.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.viewersearcher@default:default,org.eclipse.papyrus.infra.gmfdiag.widgets@default:default,org.eclipse.papyrus.infra.gmfdiag.xtext.glue@default:default,org.eclipse.papyrus.infra.services.edit.tests@default:false,org.eclipse.papyrus.infra.services.labelprovider.tests@default:default,org.eclipse.papyrus.infra.tools@default:default,org.eclipse.papyrus.junit.utils@default:default,org.eclipse.papyrus.paletteconfiguration.tests@default:false,org.eclipse.papyrus.search.tests@default:default,org.eclipse.papyrus.sysml.diagram.blockdefinition.tests@default:false,org.eclipse.papyrus.sysml.diagram.blockdefinition@default:default,org.eclipse.papyrus.sysml.diagram.common@default:default,org.eclipse.papyrus.sysml.diagram.internalblock.tests@default:false,org.eclipse.papyrus.sysml.diagram.internalblock@default:default,org.eclipse.papyrus.sysml.diagram.requirement.tests@default:default,org.eclipse.papyrus.sysml.modelexplorer.tests@default:false,org.eclipse.papyrus.sysml.service.types.tests@default:false,org.eclipse.papyrus.sysml.service.types@default:default,org.eclipse.papyrus.sysml.tests@default:default,org.eclipse.papyrus.sysml@default:default,org.eclipse.papyrus.uml.diagram.activity.tests@default:default,org.eclipse.papyrus.uml.diagram.common@default:default,org.eclipse.papyrus.uml.diagram.component.tests@default:default,org.eclipse.papyrus.uml.diagram.component@default:default,org.eclipse.papyrus.uml.diagram.composite.tests@default:default,org.eclipse.papyrus.uml.diagram.composite@default:default,org.eclipse.papyrus.uml.diagram.deployment.tests@default:default,org.eclipse.papyrus.uml.diagram.dnd.tests@default:default,org.eclipse.papyrus.uml.diagram.interactionoverview.tests@default:default,org.eclipse.papyrus.uml.diagram.menu@default:default,org.eclipse.papyrus.uml.diagram.pkg.tests@default:default,org.eclipse.papyrus.uml.diagram.sequence.tests@default:default,org.eclipse.papyrus.uml.diagram.timing.tests@default:default,org.eclipse.papyrus.uml.diagram.usecase.tests@default:default,org.eclipse.papyrus.uml.diagram.wizards.tests@default:default,org.eclipse.papyrus.uml.diagram.wizards@default:default,org.eclipse.papyrus.uml.modelexplorer.tests@default:default,org.eclipse.papyrus.uml.service.types.tests@default:false,org.eclipse.papyrus.uml.service.types@default:default,org.eclipse.papyrus.views.modelexplorer.tests@default:default,org.eclipse.uml2.uml@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.google.guava@default:default,com.google.inject@default:default,com.ibm.icu@default:default,com.jcraft.jsch@default:default,com.sun.el@default:default,com.sun.syndication@default:default,javaewah@default:default,javax.annotation@default:default,javax.el@default:default,javax.inject@default:default,javax.servlet.jsp@default:default,javax.servlet@default:default,javax.xml@default:default,lpg.runtime.java@default:default,net.sf.eclipsecs.branding@default:default,net.sf.eclipsecs.checkstyle@default:default,net.sf.eclipsecs.core@default:default,net.sf.eclipsecs.doc@default:default,net.sf.eclipsecs.ui@default:default,net.sf.jautodoc.velocity@default:default,net.sf.jautodoc@default:default,net.sourceforge.nattable.core@default:default,org.antlr.runtime@default:default,org.apache.ant@default:default,org.apache.batik.bridge@default:default,org.apache.batik.css@default:default,org.apache.batik.dom.svg@default:default,org.apache.batik.dom@default:default,org.apache.batik.ext.awt@default:default,org.apache.batik.parser@default:default,org.apache.batik.pdf@default:default,org.apache.batik.svggen@default:default,org.apache.batik.transcoder@default:default,org.apache.batik.util.gui@default:default,org.apache.batik.util@default:default,org.apache.batik.xml@default:default,org.apache.commons.cli@default:default,org.apache.commons.codec@default:default,org.apache.commons.httpclient@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.apache.jasper.glassfish@default:default,org.apache.log4j@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.apache.ws.commons.util@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.apache.xml.serializer@default:default,org.apache.xmlrpc@default:default,org.eclipse.acceleo.common@default:default,org.eclipse.acceleo.engine@default:default,org.eclipse.acceleo.model@default:default,org.eclipse.acceleo.parser@default:default,org.eclipse.acceleo.profiler@default:default,org.eclipse.ant.core@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ant.ui@default:default,org.eclipse.cdt.codan.core.cxx@default:default,org.eclipse.cdt.codan.core@default:default,org.eclipse.cdt.codan.ui.cxx@default:default,org.eclipse.cdt.codan.ui@default:default,org.eclipse.cdt.core@default:default,org.eclipse.cdt.make.core@default:default,org.eclipse.cdt.managedbuilder.core@default:default,org.eclipse.cdt.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare.win32@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.cvs@default:default,org.eclipse.debug.core@default:default,org.eclipse.debug.ui@default:default,org.eclipse.draw2d.doc.isv@default:default,org.eclipse.draw2d@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient4.ssl@default:false,org.eclipse.ecf.provider.filetransfer.httpclient4@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.egit.core@default:default,org.eclipse.egit.doc@default:default,org.eclipse.egit.ui@default:default,org.eclipse.egit@default:default,org.eclipse.emf.ant@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.dawn.gmf@default:default,org.eclipse.emf.cdo.dawn.ui@default:default,org.eclipse.emf.cdo.dawn.util@default:default,org.eclipse.emf.cdo.dawn@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.emf.cheatsheets@default:default,org.eclipse.emf.codegen.ecore.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.codegen.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.compare.diagram@default:default,org.eclipse.emf.compare.edit@default:default,org.eclipse.emf.compare.ide@default:default,org.eclipse.emf.compare.rcp@default:default,org.eclipse.emf.compare@default:default,org.eclipse.emf.converter@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.doc@default:default,org.eclipse.emf.ecore.change.edit@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.example.installer@default:default,org.eclipse.emf.exporter@default:default,org.eclipse.emf.facet.aggregate.metamodel@default:default,org.eclipse.emf.facet.common.core@default:default,org.eclipse.emf.facet.common.ui@default:default,org.eclipse.emf.facet.custom.core@default:default,org.eclipse.emf.facet.custom.metamodel@default:default,org.eclipse.emf.facet.custom.ui@default:default,org.eclipse.emf.facet.efacet.catalog@default:default,org.eclipse.emf.facet.efacet.core@default:default,org.eclipse.emf.facet.efacet.metamodel@default:default,org.eclipse.emf.facet.efacet.ui@default:default,org.eclipse.emf.facet.efacet@default:default,org.eclipse.emf.facet.infra.browser.custom.core@default:default,org.eclipse.emf.facet.infra.browser.custom.edit@default:default,org.eclipse.emf.facet.infra.browser.custom.ui@default:default,org.eclipse.emf.facet.infra.browser.custom@default:default,org.eclipse.emf.facet.infra.browser.uicore@default:default,org.eclipse.emf.facet.infra.browser@default:default,org.eclipse.emf.facet.infra.common.core@default:default,org.eclipse.emf.facet.infra.common.ui@default:default,org.eclipse.emf.facet.infra.facet.core@default:default,org.eclipse.emf.facet.infra.facet.edit@default:default,org.eclipse.emf.facet.infra.facet.editor@default:default,org.eclipse.emf.facet.infra.facet.ui@default:default,org.eclipse.emf.facet.infra.facet@default:default,org.eclipse.emf.facet.infra.query.core@default:default,org.eclipse.emf.facet.infra.query.edit@default:default,org.eclipse.emf.facet.infra.query.editor@default:default,org.eclipse.emf.facet.infra.query.ui@default:default,org.eclipse.emf.facet.infra.query@default:default,org.eclipse.emf.facet.query.java.core@default:default,org.eclipse.emf.facet.query.java.metamodel@default:default,org.eclipse.emf.facet.query.java@default:default,org.eclipse.emf.facet.util.core@default:default,org.eclipse.emf.facet.util.emf.catalog@default:default,org.eclipse.emf.facet.util.emf.core@default:default,org.eclipse.emf.facet.util.emf.ui@default:default,org.eclipse.emf.facet.util.ui@default:default,org.eclipse.emf.facet.widgets.celleditors.ecore@default:default,org.eclipse.emf.facet.widgets.celleditors.edit@default:default,org.eclipse.emf.facet.widgets.celleditors@default:default,org.eclipse.emf.facet.widgets.nattable.instance.edit@default:default,org.eclipse.emf.facet.widgets.nattable.instance@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration.edit@default:default,org.eclipse.emf.facet.widgets.nattable.tableconfiguration@default:default,org.eclipse.emf.facet.widgets.nattable.workbench@default:default,org.eclipse.emf.facet.widgets.nattable@default:default,org.eclipse.emf.facet.widgets.table.metamodel@default:default,org.eclipse.emf.facet.widgets.table.ui.nattable@default:default,org.eclipse.emf.facet.widgets.table.ui.workbench@default:default,org.eclipse.emf.facet.widgets.table.ui@default:default,org.eclipse.emf.facet.widgets@default:default,org.eclipse.emf.importer.ecore@default:default,org.eclipse.emf.importer.java@default:default,org.eclipse.emf.importer.rose@default:default,org.eclipse.emf.importer@default:default,org.eclipse.emf.mapping.ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore.editor@default:default,org.eclipse.emf.mapping.ecore2ecore@default:default,org.eclipse.emf.mapping.ecore2xml.ui@default:default,org.eclipse.emf.mapping.ecore2xml@default:default,org.eclipse.emf.mapping.ecore@default:default,org.eclipse.emf.mapping.ui@default:default,org.eclipse.emf.mapping@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.mwe2.lib@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.emf.query.doc@default:default,org.eclipse.emf.query.examples@default:default,org.eclipse.emf.query.ocl@default:default,org.eclipse.emf.query@default:default,org.eclipse.emf.transaction.doc@default:default,org.eclipse.emf.transaction.examples@default:default,org.eclipse.emf.transaction.ui@default:default,org.eclipse.emf.transaction@default:default,org.eclipse.emf.validation.doc@default:default,org.eclipse.emf.validation.examples@default:default,org.eclipse.emf.validation.ocl@default:default,org.eclipse.emf.validation.ui.ide@default:default,org.eclipse.emf.validation.ui@default:default,org.eclipse.emf.validation@default:default,org.eclipse.emf.workspace.doc@default:default,org.eclipse.emf.workspace.ui@default:default,org.eclipse.emf.workspace@default:default,org.eclipse.emf@default:default,org.eclipse.epp.mpc.core@default:default,org.eclipse.epp.mpc.help.ui@default:default,org.eclipse.epp.mpc.ui@default:default,org.eclipse.epp.package.standard@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.console@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.launcher.win32.win32.x86_64@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.transport.ecf@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.eclipse.equinox.p2.ui.importexport@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.gef.doc.isv@default:default,org.eclipse.gef.examples.ui.pde@default:default,org.eclipse.gef@default:default,org.eclipse.gmf.bridge.trace@default:default,org.eclipse.gmf.bridge.ui.dashboard@default:default,org.eclipse.gmf.bridge.ui@default:default,org.eclipse.gmf.bridge@default:default,org.eclipse.gmf.codegen.edit@default:default,org.eclipse.gmf.codegen.ui@default:default,org.eclipse.gmf.codegen@default:default,org.eclipse.gmf.common@default:default,org.eclipse.gmf.doc.ui@default:default,org.eclipse.gmf.doc@default:default,org.eclipse.gmf.ecore.editor@default:default,org.eclipse.gmf.examples.runtime.ui.pde@default:default,org.eclipse.gmf.graphdef.codegen.ui@default:default,org.eclipse.gmf.graphdef.codegen@default:default,org.eclipse.gmf.graphdef.edit@default:default,org.eclipse.gmf.graphdef@default:default,org.eclipse.gmf.map.edit@default:default,org.eclipse.gmf.map@default:default,org.eclipse.gmf.runtime.common.core@default:default,org.eclipse.gmf.runtime.common.ui.action.ide@default:default,org.eclipse.gmf.runtime.common.ui.action@default:default,org.eclipse.gmf.runtime.common.ui.printing.win32@default:false,org.eclipse.gmf.runtime.common.ui.printing@default:default,org.eclipse.gmf.runtime.common.ui.services.action@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd.ide@default:default,org.eclipse.gmf.runtime.common.ui.services.dnd@default:default,org.eclipse.gmf.runtime.common.ui.services.properties@default:default,org.eclipse.gmf.runtime.common.ui.services@default:default,org.eclipse.gmf.runtime.common.ui@default:default,org.eclipse.gmf.runtime.diagram.core@default:default,org.eclipse.gmf.runtime.diagram.ui.actions@default:default,org.eclipse.gmf.runtime.diagram.ui.dnd@default:default,org.eclipse.gmf.runtime.diagram.ui.geoshapes@default:default,org.eclipse.gmf.runtime.diagram.ui.printing.render@default:default,org.eclipse.gmf.runtime.diagram.ui.printing@default:default,org.eclipse.gmf.runtime.diagram.ui.properties@default:default,org.eclipse.gmf.runtime.diagram.ui.providers.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.providers@default:default,org.eclipse.gmf.runtime.diagram.ui.render@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide@default:default,org.eclipse.gmf.runtime.diagram.ui.resources.editor@default:default,org.eclipse.gmf.runtime.diagram.ui@default:default,org.eclipse.gmf.runtime.draw2d.ui.render.awt@default:default,org.eclipse.gmf.runtime.draw2d.ui.render@default:default,org.eclipse.gmf.runtime.draw2d.ui@default:default,org.eclipse.gmf.runtime.emf.clipboard.core@default:default,org.eclipse.gmf.runtime.emf.commands.core@default:default,org.eclipse.gmf.runtime.emf.core@default:default,org.eclipse.gmf.runtime.emf.type.core@default:default,org.eclipse.gmf.runtime.emf.type.ui@default:default,org.eclipse.gmf.runtime.emf.ui.properties@default:default,org.eclipse.gmf.runtime.emf.ui@default:default,org.eclipse.gmf.runtime.gef.ui@default:default,org.eclipse.gmf.runtime.lite.svg@default:default,org.eclipse.gmf.runtime.notation.edit@default:default,org.eclipse.gmf.runtime.notation.providers@default:default,org.eclipse.gmf.runtime.notation.sdk@default:default,org.eclipse.gmf.runtime.notation@default:default,org.eclipse.gmf.runtime.sdk@default:default,org.eclipse.gmf.sdk@default:default,org.eclipse.gmf.tooldef.edit@default:default,org.eclipse.gmf.tooldef@default:default,org.eclipse.gmf.tooling.runtime@default:default,org.eclipse.gmf.tooling@default:default,org.eclipse.gmf.validate@default:default,org.eclipse.gmf.xpand.editor@default:default,org.eclipse.gmf.xpand.qvtlibrary@default:default,org.eclipse.gmf.xpand@default:default,org.eclipse.gmf@default:default,org.eclipse.gmt.modisco.infra.common.core@default:default,org.eclipse.gmt.modisco.infra.common.ui@default:default,org.eclipse.gmt.modisco.infra.discoverymanager@default:default,org.eclipse.gmt.modisco.xml.discoverer@default:default,org.eclipse.gmt.modisco.xml@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help.webapp@default:default,org.eclipse.help@default:default,org.eclipse.jdt.annotation@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.jgit@default:default,org.eclipse.jsch.core@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.m2m.qvt.oml.common@default:default,org.eclipse.m2m.qvt.oml.cst.parser@default:default,org.eclipse.m2m.qvt.oml.ecore.imperativeocl@default:default,org.eclipse.m2m.qvt.oml.emf.util@default:default,org.eclipse.m2m.qvt.oml.project@default:default,org.eclipse.m2m.qvt.oml.runtime@default:default,org.eclipse.m2m.qvt.oml@default:default,org.eclipse.modisco.infra.discovery.core@default:default,org.eclipse.modisco.infra.discovery.ui@default:default,org.eclipse.modisco.infra.discovery@default:default,org.eclipse.modisco.xml.discoverer@default:default,org.eclipse.mylyn.bugzilla.core@default:default,org.eclipse.mylyn.bugzilla.ui@default:default,org.eclipse.mylyn.commons.core@default:default,org.eclipse.mylyn.commons.identity.core@default:default,org.eclipse.mylyn.commons.net@default:default,org.eclipse.mylyn.commons.notifications.core@default:default,org.eclipse.mylyn.commons.notifications.feed@default:default,org.eclipse.mylyn.commons.notifications.ui@default:default,org.eclipse.mylyn.commons.repositories.core@default:default,org.eclipse.mylyn.commons.repositories.ui@default:default,org.eclipse.mylyn.commons.screenshots@default:default,org.eclipse.mylyn.commons.ui@default:default,org.eclipse.mylyn.commons.workbench@default:default,org.eclipse.mylyn.commons.xmlrpc@default:default,org.eclipse.mylyn.context.core@default:default,org.eclipse.mylyn.discovery.core@default:default,org.eclipse.mylyn.discovery.ui@default:default,org.eclipse.mylyn.git.core@default:default,org.eclipse.mylyn.git.ui@default:default,org.eclipse.mylyn.monitor.core@default:default,org.eclipse.mylyn.monitor.ui@default:default,org.eclipse.mylyn.tasks.core@default:default,org.eclipse.mylyn.tasks.index.core@default:default,org.eclipse.mylyn.tasks.index.ui@default:default,org.eclipse.mylyn.tasks.search@default:default,org.eclipse.mylyn.tasks.ui@default:default,org.eclipse.mylyn.versions.core@default:default,org.eclipse.mylyn.versions.ui@default:default,org.eclipse.nebula.widgets.nattable.core@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default,org.eclipse.ocl.common.ui@default:default,org.eclipse.ocl.common@default:default,org.eclipse.ocl.ecore@default:default,org.eclipse.ocl.examples.common@default:default,org.eclipse.ocl.examples.domain@default:default,org.eclipse.ocl.examples.library@default:default,org.eclipse.ocl.examples.pivot@default:default,org.eclipse.ocl.examples.xtext.base@default:default,org.eclipse.ocl.examples.xtext.console@default:default,org.eclipse.ocl.examples.xtext.essentialocl.ui@default:default,org.eclipse.ocl.examples.xtext.essentialocl@default:default,org.eclipse.ocl.examples.xtext.markup.ui@default:default,org.eclipse.ocl.examples.xtext.markup@default:default,org.eclipse.ocl.uml@default:default,org.eclipse.ocl@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.papyrus.acceleo@default:default,org.eclipse.papyrus.cdo.core@default:default,org.eclipse.papyrus.cdo.ui.customization.properties@default:default,org.eclipse.papyrus.cdo.ui.doc@default:default,org.eclipse.papyrus.cdo.ui@default:default,org.eclipse.papyrus.cdo.uml.diagram.ui@default:default,org.eclipse.papyrus.cdo.uml.ui@default:default,org.eclipse.papyrus.cdo.validation.problems.edit@default:default,org.eclipse.papyrus.cdo.validation.problems@default:default,org.eclipse.papyrus.cpp.codegen.ui@default:default,org.eclipse.papyrus.cpp.codegen@default:default,org.eclipse.papyrus.cpp.profile@default:default,org.eclipse.papyrus.customization.palette@default:default,org.eclipse.papyrus.customization.paletteconfiguration@default:default,org.eclipse.papyrus.customization.properties.generation@default:default,org.eclipse.papyrus.customization.properties.model.xwt@default:default,org.eclipse.papyrus.customization.properties@default:default,org.eclipse.papyrus.customization@default:default,org.eclipse.papyrus.diagramtemplate.edit@default:default,org.eclipse.papyrus.diagramtemplate.editor@default:default,org.eclipse.papyrus.diagramtemplate@default:default,org.eclipse.papyrus.dsml.validation.doc@default:default,org.eclipse.papyrus.dsml.validation.generator@default:default,org.eclipse.papyrus.dsml.validation.model.ui@default:default,org.eclipse.papyrus.dsml.validation.model@default:default,org.eclipse.papyrus.dsml.validation.properties@default:default,org.eclipse.papyrus.dsml.validation.wizard@default:default,org.eclipse.papyrus.dsml.validation@default:default,org.eclipse.papyrus.eastadl@default:default,org.eclipse.papyrus.eclipse.project.editors@default:default,org.eclipse.papyrus.editor@default:default,org.eclipse.papyrus.fcm.profile@default:default,org.eclipse.papyrus.infra.constraints.edit@default:default,org.eclipse.papyrus.infra.constraints.editor@default:default,org.eclipse.papyrus.infra.constraints@default:default,org.eclipse.papyrus.infra.core.log@default:default,org.eclipse.papyrus.infra.core.sasheditor.di@default:default,org.eclipse.papyrus.infra.core.sasheditor@default:default,org.eclipse.papyrus.infra.discovery.ui.menu@default:default,org.eclipse.papyrus.infra.discovery.ui@default:default,org.eclipse.papyrus.infra.discovery@default:default,org.eclipse.papyrus.infra.doc@default:default,org.eclipse.papyrus.infra.emf.appearance@default:default,org.eclipse.papyrus.infra.emf.diagram.common@default:default,org.eclipse.papyrus.infra.emf.facet.queries@default:default,org.eclipse.papyrus.infra.emf.nattable.converter@default:default,org.eclipse.papyrus.infra.emf.nattable@default:default,org.eclipse.papyrus.infra.emf.readonly@default:default,org.eclipse.papyrus.infra.emf@default:default,org.eclipse.papyrus.infra.export@default:default,org.eclipse.papyrus.infra.extendedtypes.emf@default:default,org.eclipse.papyrus.infra.extendedtypes@default:default,org.eclipse.papyrus.infra.gmfdiag.css.doc@default:default,org.eclipse.papyrus.infra.gmfdiag.modelexplorer@default:default,org.eclipse.papyrus.infra.hyperlink@default:default,org.eclipse.papyrus.infra.nattable.common@default:default,org.eclipse.papyrus.infra.nattable.controlmode@default:default,org.eclipse.papyrus.infra.nattable.model.edit@default:default,org.eclipse.papyrus.infra.nattable.model.editor@default:default,org.eclipse.papyrus.infra.nattable.model@default:default,org.eclipse.papyrus.infra.nattable.modelexplorer@default:default,org.eclipse.papyrus.infra.nattable.properties@default:default,org.eclipse.papyrus.infra.nattable.views.config@default:default,org.eclipse.papyrus.infra.nattable.views.editor@default:default,org.eclipse.papyrus.infra.nattable@default:default,org.eclipse.papyrus.infra.onefile@default:default,org.eclipse.papyrus.infra.psf@default:default,org.eclipse.papyrus.infra.queries.core.configuration.edit@default:default,org.eclipse.papyrus.infra.queries.core.configuration@default:default,org.eclipse.papyrus.infra.queries.core@default:default,org.eclipse.papyrus.infra.services.controlmode.history@default:default,org.eclipse.papyrus.infra.services.controlmode@default:default,org.eclipse.papyrus.infra.services.decoration@default:default,org.eclipse.papyrus.infra.services.edit@default:default,org.eclipse.papyrus.infra.services.labelprovider@default:default,org.eclipse.papyrus.infra.services.markerlistener@default:default,org.eclipse.papyrus.infra.services.navigation@default:default,org.eclipse.papyrus.infra.services.openelement@default:default,org.eclipse.papyrus.infra.services.resourceloading.preferences@default:default,org.eclipse.papyrus.infra.services.resourceloading@default:default,org.eclipse.papyrus.infra.services.semantic@default:default,org.eclipse.papyrus.infra.services.tracepoints@default:default,org.eclipse.papyrus.infra.services.validation@default:default,org.eclipse.papyrus.infra.services.viewersearch@default:default,org.eclipse.papyrus.infra.services.viewlabelprovider@default:default,org.eclipse.papyrus.infra.table.common@default:default,org.eclipse.papyrus.infra.table.controlmode@default:default,org.eclipse.papyrus.infra.table.instance@default:default,org.eclipse.papyrus.infra.table.menu@default:default,org.eclipse.papyrus.infra.table.modelexplorer@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.edit@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel.editor@default:default,org.eclipse.papyrus.infra.table.papyrustableconfiguration.metamodel@default:default,org.eclipse.papyrus.infra.table.properties@default:default,org.eclipse.papyrus.infra.ui.resources@default:default,org.eclipse.papyrus.infra.widgets.toolbox@default:default,org.eclipse.papyrus.infra.widgets@default:default,org.eclipse.papyrus.java.generator.jdtsynchronizer@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt.edit@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt.editor@default:default,org.eclipse.papyrus.java.generator.metamodel.jdt@default:default,org.eclipse.papyrus.java.generator.transfo.umltojdt@default:default,org.eclipse.papyrus.java.generator.ui@default:default,org.eclipse.papyrus.java.profile.edit@default:default,org.eclipse.papyrus.java.profile.editor@default:default,org.eclipse.papyrus.java.profile@default:default,org.eclipse.papyrus.java.reverse.ui@default:default,org.eclipse.papyrus.java.reverse@default:default,org.eclipse.papyrus.marte.properties@default:default,org.eclipse.papyrus.marte.static.profile@default:default,org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext.ui@default:default,org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext@default:default,org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext.ui@default:default,org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext@default:default,org.eclipse.papyrus.marte.vsl.ui@default:default,org.eclipse.papyrus.marte.vsl@default:default,org.eclipse.papyrus.migration.properties.model@default:default,org.eclipse.papyrus.robotml.diagram.architecture@default:default,org.eclipse.papyrus.robotml.diagram.common@default:default,org.eclipse.papyrus.robotml.diagram.componentdef@default:default,org.eclipse.papyrus.robotml.diagram.datatypedef@default:default,org.eclipse.papyrus.robotml.diagram.interfacedef@default:default,org.eclipse.papyrus.robotml.diagram.ui@default:default,org.eclipse.papyrus.robotml.doc@default:default,org.eclipse.papyrus.robotml.generators.common@default:default,org.eclipse.papyrus.robotml.generators.intempora.rtmaps.ui@default:default,org.eclipse.papyrus.robotml.generators.intempora.rtmaps@default:default,org.eclipse.papyrus.robotml.modelexplorer@default:default,org.eclipse.papyrus.robotml.perspective@default:default,org.eclipse.papyrus.robotml.templaterepository@default:default,org.eclipse.papyrus.robotml.validation@default:default,org.eclipse.papyrus.robotml@default:default,org.eclipse.papyrus.sysml.diagram.requirement@default:default,org.eclipse.papyrus.sysml.diagram.ui@default:default,org.eclipse.papyrus.sysml.edit@default:default,org.eclipse.papyrus.sysml.facets@default:default,org.eclipse.papyrus.sysml.modelexplorer@default:default,org.eclipse.papyrus.sysml.nattable.allocation.config@default:default,org.eclipse.papyrus.sysml.nattable.allocation@default:default,org.eclipse.papyrus.sysml.nattable.menu@default:default,org.eclipse.papyrus.sysml.nattable.requirement.config@default:default,org.eclipse.papyrus.sysml.nattable.requirement@default:default,org.eclipse.papyrus.sysml.nattable@default:default,org.eclipse.papyrus.sysml.properties@default:default,org.eclipse.papyrus.sysml.table.allocation@default:default,org.eclipse.papyrus.sysml.table.requirement@default:default,org.eclipse.papyrus.texteditor.cdt@default:default,org.eclipse.papyrus.texteditor.model@default:default,org.eclipse.papyrus.texteditor.modelexplorer@default:default,org.eclipse.papyrus.uml.alf.ui@default:default,org.eclipse.papyrus.uml.alf@default:default,org.eclipse.papyrus.uml.appearance@default:default,org.eclipse.papyrus.uml.commands@default:default,org.eclipse.papyrus.uml.compare@default:default,org.eclipse.papyrus.uml.controlmode.profile@default:default,org.eclipse.papyrus.uml.diagram.activity@default:default,org.eclipse.papyrus.uml.diagram.clazz@default:default,org.eclipse.papyrus.uml.diagram.common.doc@default:default,org.eclipse.papyrus.uml.diagram.common.groups@default:default,org.eclipse.papyrus.uml.diagram.common.palette.customaction@default:default,org.eclipse.papyrus.uml.diagram.communication@default:default,org.eclipse.papyrus.uml.diagram.css@default:default,org.eclipse.papyrus.uml.diagram.deployment@default:default,org.eclipse.papyrus.uml.diagram.dnd@default:default,org.eclipse.papyrus.uml.diagram.icons@default:default,org.eclipse.papyrus.uml.diagram.interactionoverview@default:default,org.eclipse.papyrus.uml.diagram.modelexplorer@default:default,org.eclipse.papyrus.uml.diagram.navigation@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit@default:default,org.eclipse.papyrus.uml.diagram.paletteconfiguration@default:default,org.eclipse.papyrus.uml.diagram.profile.doc@default:default,org.eclipse.papyrus.uml.diagram.profile@default:default,org.eclipse.papyrus.uml.diagram.sequence@default:default,org.eclipse.papyrus.uml.diagram.statemachine@default:default,org.eclipse.papyrus.uml.diagram.stereotype.edition@default:default,org.eclipse.papyrus.uml.diagram.symbols@default:default,org.eclipse.papyrus.uml.diagram.timing@default:default,org.eclipse.papyrus.uml.diagram.usecase@default:default,org.eclipse.papyrus.uml.documentation.profile@default:default,org.eclipse.papyrus.uml.export@default:default,org.eclipse.papyrus.uml.extensionpoints@default:default,org.eclipse.papyrus.uml.icons@default:default,org.eclipse.papyrus.uml.import@default:default,org.eclipse.papyrus.uml.modelexplorer.widgets@default:default,org.eclipse.papyrus.uml.modelexplorer@default:default,org.eclipse.papyrus.uml.modelrepair@default:default,org.eclipse.papyrus.uml.nattable.generic.config@default:default,org.eclipse.papyrus.uml.nattable.generic@default:default,org.eclipse.papyrus.uml.nattable.menu@default:default,org.eclipse.papyrus.uml.nattable@default:default,org.eclipse.papyrus.uml.navigation@default:default,org.eclipse.papyrus.uml.oclconstraintevaluation@default:default,org.eclipse.papyrus.uml.pastemanager@default:default,org.eclipse.papyrus.uml.perspective@default:default,org.eclipse.papyrus.uml.profile@default:default,org.eclipse.papyrus.uml.profilefacet.generation@default:default,org.eclipse.papyrus.uml.profilefacet.metamodel@default:default,org.eclipse.papyrus.uml.profilefacet@default:default,org.eclipse.papyrus.uml.properties@default:default,org.eclipse.papyrus.uml.resourceloading.profile@default:default,org.eclipse.papyrus.uml.search.ui.doc@default:default,org.eclipse.papyrus.uml.search.ui@default:default,org.eclipse.papyrus.uml.service.validation@default:default,org.eclipse.papyrus.uml.services.decoration@default:default,org.eclipse.papyrus.uml.table.common@default:default,org.eclipse.papyrus.uml.table.default@default:default,org.eclipse.papyrus.uml.table.widgets.celleditors@default:default,org.eclipse.papyrus.uml.templaterepository@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.collaborationuse.xtext@default:default,org.eclipse.papyrus.uml.textedit.common.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.common.xtext@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext@default:default,org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext@default:default,org.eclipse.papyrus.uml.textedit.javaconstraint@default:default,org.eclipse.papyrus.uml.textedit.message.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.message.xtext@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.parameter.xtext@default:default,org.eclipse.papyrus.uml.textedit.port.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.port.xtext@default:default,org.eclipse.papyrus.uml.textedit.property.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.property.xtext@default:default,org.eclipse.papyrus.uml.textedit.state.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.state.xtext@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext.ui@default:default,org.eclipse.papyrus.uml.textedit.transition.xtext@default:default,org.eclipse.papyrus.uml.tools.extendedtypes@default:default,org.eclipse.papyrus.uml.tools.utils@default:default,org.eclipse.papyrus.uml.tools@default:default,org.eclipse.papyrus.umlrt.properties@default:default,org.eclipse.papyrus.umlrt.validation@default:default,org.eclipse.papyrus.umlrt.wizard@default:default,org.eclipse.papyrus.umlrt@default:default,org.eclipse.papyrus.views.cpp@default:default,org.eclipse.papyrus.views.modelexplorer.resourceloading@default:default,org.eclipse.papyrus.views.modelexplorer.widgets@default:default,org.eclipse.papyrus.views.modelexplorer@default:default,org.eclipse.papyrus.views.properties.model.edit@default:default,org.eclipse.papyrus.views.properties.model.editor@default:default,org.eclipse.papyrus.views.properties.model@default:default,org.eclipse.papyrus.views.properties@default:default,org.eclipse.papyrus.views.search@default:default,org.eclipse.papyrus.views.tracepoints@default:default,org.eclipse.papyrus.views.validation@default:default,org.eclipse.papyrus.xwt@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.platform@default:default,org.eclipse.rcp@default:default,org.eclipse.search@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.browser@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.console@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.uml2.codegen.ecore@default:default,org.eclipse.uml2.common.edit@default:default,org.eclipse.uml2.common@default:default,org.eclipse.uml2.types@default:default,org.eclipse.uml2.uml.edit@default:default,org.eclipse.uml2.uml.editor@default:default,org.eclipse.uml2.uml.profile.l2@default:default,org.eclipse.uml2.uml.profile.l3@default:default,org.eclipse.uml2.uml.resources@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.xpand@default:default,org.eclipse.xtend.lib@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.xtend@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.xtext.common.types.edit@default:default,org.eclipse.xtext.common.types.ui@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.xtext.ecore@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.xtext.smap@default:default,org.eclipse.xtext.ui.codetemplates.ui@default:default,org.eclipse.xtext.ui.codetemplates@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.xtext.util@default:default,org.eclipse.xtext.xbase.lib@default:default,org.eclipse.xtext.xbase@default:default,org.eclipse.xtext@default:default,org.hamcrest.core@default:default,org.jdom@default:default,org.junit@default:default,org.objectweb.asm@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil*1.0.0.v200806040011@default:default,org.w3c.dom.smil*1.0.1.v200903091627@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.papyrus.bundles.tests@default:default,org.eclipse.papyrus.core.queries.configuration.tests@default:default,org.eclipse.papyrus.core.queries.test@default:default,org.eclipse.papyrus.core.resourceloading.tests@default:false,org.eclipse.papyrus.core.tests@default:false,org.eclipse.papyrus.def@default:default,org.eclipse.papyrus.diagram.clazz.tests@default:default,org.eclipse.papyrus.diagram.common.tests@default:false,org.eclipse.papyrus.diagram.stereotypeproperty.tests@default:default,org.eclipse.papyrus.diagram.tests@default:default,org.eclipse.papyrus.domaincontextcodegen@default:default,org.eclipse.papyrus.editor.integration.tests@default:default,org.eclipse.papyrus.extensionpoints.editors@default:default,org.eclipse.papyrus.gmfgenextension@default:default,org.eclipse.papyrus.infra.core.sasheditor.di.tests@default:false,org.eclipse.papyrus.infra.core.sasheditor.tests@default:false,org.eclipse.papyrus.infra.core@default:default,org.eclipse.papyrus.infra.emf.tests@default:false,org.eclipse.papyrus.infra.gmfdiag.commands@default:default,org.eclipse.papyrus.infra.gmfdiag.common@default:default,org.eclipse.papyrus.infra.gmfdiag.controlmode@default:default,org.eclipse.papyrus.infra.gmfdiag.css.configuration@default:default,org.eclipse.papyrus.infra.gmfdiag.css.debug@default:default,org.eclipse.papyrus.infra.gmfdiag.css.model@default:default,org.eclipse.papyrus.infra.gmfdiag.css.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.css.theme@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui@default:default,org.eclipse.papyrus.infra.gmfdiag.css.xtext@default:default,org.eclipse.papyrus.infra.gmfdiag.css@default:default,org.eclipse.papyrus.infra.gmfdiag.dnd@default:default,org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter@default:default,org.eclipse.papyrus.infra.gmfdiag.hyperlink@default:default,org.eclipse.papyrus.infra.gmfdiag.menu@default:default,org.eclipse.papyrus.infra.gmfdiag.navigation@default:default,org.eclipse.papyrus.infra.gmfdiag.outline@default:default,org.eclipse.papyrus.infra.gmfdiag.preferences@default:default,org.eclipse.papyrus.infra.gmfdiag.properties@default:default,org.eclipse.papyrus.infra.gmfdiag.viewersearcher@default:default,org.eclipse.papyrus.infra.gmfdiag.widgets@default:default,org.eclipse.papyrus.infra.gmfdiag.xtext.glue@default:default,org.eclipse.papyrus.infra.services.edit.tests@default:false,org.eclipse.papyrus.infra.services.labelprovider.tests@default:default,org.eclipse.papyrus.infra.tools@default:default,org.eclipse.papyrus.junit.utils@default:default,org.eclipse.papyrus.paletteconfiguration.tests@default:false,org.eclipse.papyrus.search.tests@default:default,org.eclipse.papyrus.sysml.diagram.blockdefinition.tests@default:false,org.eclipse.papyrus.sysml.diagram.blockdefinition@default:default,org.eclipse.papyrus.sysml.diagram.common@default:default,org.eclipse.papyrus.sysml.diagram.internalblock.tests@default:false,org.eclipse.papyrus.sysml.diagram.internalblock@default:default,org.eclipse.papyrus.sysml.diagram.requirement.tests@default:default,org.eclipse.papyrus.sysml.modelexplorer.tests@default:false,org.eclipse.papyrus.sysml.service.types.tests@default:false,org.eclipse.papyrus.sysml.service.types@default:default,org.eclipse.papyrus.sysml.tests@default:default,org.eclipse.papyrus.sysml@default:default,org.eclipse.papyrus.uml.diagram.activity.tests@default:default,org.eclipse.papyrus.uml.diagram.common@default:default,org.eclipse.papyrus.uml.diagram.component.tests@default:default,org.eclipse.papyrus.uml.diagram.component@default:default,org.eclipse.papyrus.uml.diagram.composite.tests@default:default,org.eclipse.papyrus.uml.diagram.composite@default:default,org.eclipse.papyrus.uml.diagram.deployment.tests@default:default,org.eclipse.papyrus.uml.diagram.dnd.tests@default:default,org.eclipse.papyrus.uml.diagram.interactionoverview.tests@default:default,org.eclipse.papyrus.uml.diagram.menu@default:default,org.eclipse.papyrus.uml.diagram.sequence.tests@default:default,org.eclipse.papyrus.uml.diagram.timing.tests@default:default,org.eclipse.papyrus.uml.diagram.usecase.tests@default:default,org.eclipse.papyrus.uml.diagram.wizards.tests@default:default,org.eclipse.papyrus.uml.diagram.wizards@default:default,org.eclipse.papyrus.uml.modelexplorer.tests@default:default,org.eclipse.papyrus.uml.service.types.tests@default:false,org.eclipse.papyrus.uml.service.types@default:default,org.eclipse.papyrus.views.modelexplorer.tests@default:default,org.eclipse.uml2.uml@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.project
deleted file mode 100644
index a064f343692..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.pkg.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f287d53cf45..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 50333dfd5cf..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.diagram.tests;bundle-version="1.0.0",
- org.eclipse.uml2.uml;bundle-version="4.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.uml.diagram.pkg;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.pkg.tests,
- org.eclipse.papyrus.uml.diagram.pkg.tests.canonical,
- org.eclipse.papyrus.uml.diagram.pkg.tests.load
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: Package Diagram Tests (Incubation)
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.pkg.tests.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.pkg.tests
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-Vendor: Eclipse Modeling Project
-
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/org.eclipse.papyrus.uml.diagram.pkg.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/org.eclipse.papyrus.uml.diagram.pkg.test.launch
deleted file mode 100644
index 2ef02d31a9c..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/org.eclipse.papyrus.uml.diagram.pkg.test.launch
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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="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-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/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.pkg.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.pkg.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.5 -Xms256m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="false"/>
-<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.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/AllTests.java
deleted file mode 100644
index 6d67b337548..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/AllTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests;
-
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AllCanonicalTests;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.load.LoadTests;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All tests together.
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// canonical
-AllCanonicalTests.class,
-
-// load
-LoadTests.class })
-public class AllTests {
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java
deleted file mode 100644
index 8bfeba855b6..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/IPackageDiagramTestsConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests;
-
-public interface IPackageDiagramTestsConstants {
-
- /** name of the test project */
- public final String PROJECT_NAME = "PackageDiagramTestProject";
-
- /** name of the test model */
- public final String FILE_NAME = "PackageDiagramTest.di";
-} \ No newline at end of file
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AbstractPapyrusTestCase.java
deleted file mode 100644
index 0599da6053d..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AbstractPapyrusTestCase.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-
-/**
- * The Class AbstractPapyrusTestCase.
- */
-public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.diagram.tests.canonical.AbstractPapyrusTestCase {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AllCanonicalTests.java
deleted file mode 100644
index 9b249aee28d..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/AllCanonicalTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All test in canonical package
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// Top node
-TestPackageDiagramTopNode.class,
-// Child node
-TestPackageDiagramChildNode.class,
-// Link
-TestPackageDiagramLink.class,
-// Constraint Link
-TestPackageDiagramConstraintLink.class,
-// Comment Link
-TestPackageDiagramCommentLink.class, })
-public class AllCanonicalTests {
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java
deleted file mode 100644
index 31c1536cc7b..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramChildNode.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.diagram.tests.canonical.TestChildNode;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramTopNode.
- */
-public class TestPackageDiagramChildNode extends TestChildNode {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
- @Override
- protected CreateViewRequest createViewRequestShapeContainer() {
- return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
- }
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to manage model.
- */
- @Test
- public void testToManageModel() {
- testToManageNode(ElementTypes.MODEL_CN, UMLPackage.eINSTANCE.getModel(), ElementTypes.PACKAGE_CN, true);
- }
-
- /**
- * Test to manage i package.
- */
- @Test
- public void testToManageIPackage() {
- testToManageNode(ElementTypes.PACKAGE_CN, UMLPackage.eINSTANCE.getPackage(), ElementTypes.PACKAGE_CN, true);
- }
-
- /**
- * Test to manage Comment.
- */
- @Test
- public void testToManageComment() {
- testToManageNode(ElementTypes.COMMENT_CN, UMLPackage.eINSTANCE.getComment(), ElementTypes.PACKAGE_CN, true);
- }
-
- /**
- * Test to manage Constraint.
- */
- @Test
- public void testToManageConstraint() {
- testToManageNode(ElementTypes.CONSTRAINT_CN, UMLPackage.eINSTANCE.getConstraint(), ElementTypes.PACKAGE_CN, true);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java
deleted file mode 100644
index d21c858f1e4..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramCommentLink.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.diagram.tests.canonical.TestCommentLink;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.junit.Test;
-
-public class TestPackageDiagramCommentLink extends TestCommentLink {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to manage Comment
- */
- @Test
- public void testToManageComment() {
- testToManageLink(ElementTypes.COMMENT, ElementTypes.PACKAGE, ElementTypes.COMMENT_ANNOTATED_ELEMENT, ElementTypes.PACKAGE, true);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java
deleted file mode 100644
index 39b49cd1c00..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramConstraintLink.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.diagram.tests.canonical.TestConstraintLink;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.junit.Test;
-
-public class TestPackageDiagramConstraintLink extends TestConstraintLink {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to manage Constraint
- */
- @Test
- public void testToManageConstraint() {
- testToManageLink(ElementTypes.CONSTRAINT, ElementTypes.PACKAGE, ElementTypes.CONSTRAINT_CONSTRAINED_ELEMENT, ElementTypes.PACKAGE, true);
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java
deleted file mode 100644
index 0f06f978284..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramLink.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.diagram.tests.canonical.TestLinkOwnedBySource;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramLink.
- */
-public class TestPackageDiagramLink extends TestLinkOwnedBySource {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to manage Abstraction
- */
- @Test
- public void testToManageAbstraction() {
- testToManageLink(ElementTypes.PACKAGE, ElementTypes.PACKAGE, ElementTypes.ABSTRACTION, ElementTypes.PACKAGE, true);
- }
-
- /**
- * Test to manage Dependency
- */
- @Test
- public void testToManageDependency() {
- testToManageLink(ElementTypes.PACKAGE, ElementTypes.PACKAGE, ElementTypes.DEPENDENCY, ElementTypes.PACKAGE, true);
- }
-
- /**
- * Test to manage Dependency
- */
- @Test
- public void testToManagePackageImport() {
- testToManageLink(ElementTypes.PACKAGE, ElementTypes.PACKAGE, ElementTypes.PACKAGE_IMPORT, ElementTypes.PACKAGE, true);
- }
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java
deleted file mode 100644
index b9de67039b2..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/canonical/TestPackageDiagramTopNode.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.canonical;
-
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.diagram.tests.canonical.TestTopNode;
-import org.eclipse.papyrus.uml.diagram.pkg.PackageDiagramCreateCommand;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Test;
-
-/**
- * The Class TestClassDiagramTopNode.
- */
-public class TestPackageDiagramTopNode extends TestTopNode {
-
- @Override
- protected ICreationCommand getDiagramCommandCreation() {
- return new PackageDiagramCreateCommand();
- }
-
- @Override
- protected CreateViewRequest createViewRequestShapeContainer() {
- return CreateViewRequestFactory.getCreateShapeRequest(ElementTypes.PACKAGE, getDiagramEditPart().getDiagramPreferencesHint());
- }
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to manage model.
- */
- @Test
- public void testToManageModel() {
- testToManageNode(ElementTypes.MODEL, UMLPackage.eINSTANCE.getModel(), ElementTypes.PACKAGE, true);
- }
-
- /**
- * Test to manage i package.
- */
- @Test
- public void testToManageIPackage() {
- testToManageNode(ElementTypes.PACKAGE, UMLPackage.eINSTANCE.getPackage(), ElementTypes.PACKAGE, true);
- }
-
- /**
- * Test to manage Comment.
- */
- @Test
- public void testToManageComment() {
- testToManageNode(ElementTypes.COMMENT, UMLPackage.eINSTANCE.getComment(), ElementTypes.PACKAGE, true);
- }
-
- /**
- * Test to manage Constraint.
- */
- @Test
- public void testToManageConstraint() {
- testToManageNode(ElementTypes.CONSTRAINT, UMLPackage.eINSTANCE.getConstraint(), ElementTypes.PACKAGE, true);
- }
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java
deleted file mode 100644
index 84406c34705..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load100PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load100PackageTest.
- */
-public class Load100PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load100 package.
- */
- @Test
- public void testLoad100Package() {
- for(int i = 0; i < 100; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java
deleted file mode 100644
index 1d2bfc31cd6..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load10PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load10PackageTest.
- */
-public class Load10PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load10 package.
- */
- @Test
- public void testLoad10Package() {
- for(int i = 0; i < 10; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java
deleted file mode 100644
index 7f93bdb8321..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load200PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load200PackageTest.
- */
-public class Load200PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load200 package.
- */
- @Test
- public void testLoad200Package() {
- for(int i = 0; i < 200; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java
deleted file mode 100644
index 9a9681be913..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load300PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load300PackageTest.
- */
-public class Load300PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load300 package.
- */
- @Test
- public void testLoad300Package() {
- for(int i = 0; i < 300; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java
deleted file mode 100644
index 27536b2ea0b..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load400PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load400PackageTest.
- */
-public class Load400PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load400 package.
- */
- @Test
- public void testLoad400Package() {
- for(int i = 0; i < 400; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java
deleted file mode 100644
index 6f79565f0cc..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/Load500PackageTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.pkg.provider.ElementTypes;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.IPackageDiagramTestsConstants;
-import org.eclipse.papyrus.uml.diagram.pkg.tests.canonical.AbstractPapyrusTestCase;
-import org.junit.Test;
-
-/**
- * The Class Load500PackageTest.
- */
-public class Load500PackageTest extends AbstractPapyrusTestCase {
-
- @Override
- protected String getProjectName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- @Override
- protected String getFileName() {
- return IPackageDiagramTestsConstants.PROJECT_NAME;
- }
-
- /**
- * Test to create a node.
- *
- * @param type
- * the type
- */
- public void testToCreateANode(IElementType type) {
- CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
- Command command = getDiagramEditPart().getCommand(requestcreation);
- assertNotNull("CREATION: creation command null", command);
- assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
- assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
- diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
- }
-
- /**
- * Test load500 package.
- */
- @Test
- public void testLoad500Package() {
- for(int i = 0; i < 500; i++) {
- testToCreateANode(ElementTypes.PACKAGE);
- }
- }
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/LoadTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/LoadTests.java
deleted file mode 100644
index e8a886caed8..00000000000
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.pkg.tests/src/org/eclipse/papyrus/uml/diagram/pkg/tests/load/LoadTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * 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:
- * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
- /*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.pkg.tests.load;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * All tests together.
- */
-@RunWith(Suite.class)
-@SuiteClasses({
-// 10 classes
-Load10PackageTest.class,
-// 100 classes
-Load100PackageTest.class,
-// 200 classes
-Load200PackageTest.class,
-// 300 classes
-Load300PackageTest.class,
-// 400 classes
-Load400PackageTest.class,
-// 500 classes
-Load500PackageTest.class, })
-public class LoadTests {
-
-}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
index e228450e321..a2ad97c8d05 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf.appearance;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0"
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.diagram.sequence.tests
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
index c4b68be5247..7ade946e385 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF
@@ -18,7 +18,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.common.core
Export-Package: org.eclipse.papyrus.diagram.tests.canonical
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java
index 95a6dba1b91..d330791ed97 100644
--- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java
+++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java
@@ -14,37 +14,52 @@
package org.eclipse.papyrus.diagram.tests.canonical;
import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
import junit.framework.TestCase;
+import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.transaction.RunnableWithResult;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.commands.ICreationCommand;
import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
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.DiResourceSet;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.intro.IIntroPart;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.util.UMLUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -209,6 +224,10 @@ public abstract class AbstractPapyrusTestCase extends TestCase {
*/
protected abstract String getFileName();
+ protected String[] getRequiredProfiles() {
+ return new String[0];
+ }
+
/**
* Project creation.
*/
@@ -262,7 +281,35 @@ public abstract class AbstractPapyrusTestCase extends TestCase {
} catch (ServiceException ex) {
//Ignore exceptions
}
- // diResourceSet.createsModels(file);
+
+ // Apply the required profiles
+ ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
+ modifiedFiles.add(file);
+ ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) {
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
+ EObject obj;
+ try {
+ obj = resModel.lookupRoot();
+ } catch (NotFoundException e) {
+ return CommandResult.newErrorCommandResult(e);
+ }
+ if (obj instanceof Model) {
+ Model model = (Model) obj;
+ for (String uri : getRequiredProfiles()) {
+ EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
+ if (definition != null) {
+ Profile profile = UMLUtil.getProfile(definition, model);
+ model.applyProfile(profile);
+ }
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ commandProfiles.execute(new NullProgressMonitor(), null);
+
ICreationCommand command = getDiagramCommandCreation();
command.createDiagram(diResourceSet, null, "DiagramToTest");
diResourceSet.save(new NullProgressMonitor());

Back to the top